Commit 8950e11c authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

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: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711887}
parent e63d2e22
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment