Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3007)

Unified Diff: build/toolchain/win/BUILD.gn

Issue 1947223003: Tell clang-cl to use POSIX quoting for response files when running on non-Windows hosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/win/BUILD.gn
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index dfd1e84be24d52b5eb0ca60a554e9f02d9660db4..43b84b61ca52fa489c712067a73fa57cd648507e 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -55,7 +55,15 @@ template("msvc_toolchain") {
env = invoker.environment
- cl = invoker.cl
+ if (invoker.is_clang && host_os != "win") {
+ # This toolchain definition uses response files for compilations. GN uses
+ # the quoting rules of the host OS, while clang-cl always defaults to
+ # cmd.exe quoting rules for parsing response files. Tell clang-cl to use
+ # POSIX quoting rules, so it can understand what GN generates.
+ cl = "${invoker.cl} --rsp-quoting=posix"
+ } else {
+ cl = invoker.cl
+ }
if (use_lld) {
if (host_os == "win") {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698