Flip slashes for lib/link commands on Windows
crrev.com/c/1713826 flipped slashes from / to \ so that clang-cl commands could be copy/paste run on Windows. While investigating a recent compiler bug I had the need to copy/paste run linker commands on Windows and realized that I hadn't flipped those slashes. This change finishes the job, for lib/link commands, tested with component and non-component builds of base. Change-Id: If5570ab3093b42908bebab9944cde82da31a055d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1894094 Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#711887} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 8950e11c374a90a473de26b11dbe5b3a6187607b
This commit is contained in:
Родитель
337f0f19d5
Коммит
e50236136c
|
@ -102,8 +102,12 @@ template("msvc_toolchain") {
|
|||
|
||||
# lld-link includes a replacement for lib.exe that can produce thin
|
||||
# archives and understands bitcode (for lto builds).
|
||||
lib = "$prefix/$lld_link /lib"
|
||||
link = "$prefix/$lld_link"
|
||||
if (host_os == "win") {
|
||||
# Flip the slashes so that copy/paste of the commands works.
|
||||
link = string_replace(link, "/", "\\")
|
||||
}
|
||||
lib = "$link /lib"
|
||||
if (host_os != "win") {
|
||||
# See comment adding --rsp-quoting to $cl above for more information.
|
||||
link = "$link --rsp-quoting=posix"
|
||||
|
|
Загрузка…
Ссылка в новой задаче