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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/sanitizers/sanitizers.gni") 5 import("//build/config/sanitizers/sanitizers.gni")
6 import("//build/config/win/visual_studio_version.gni") 6 import("//build/config/win/visual_studio_version.gni")
7 import("//build/toolchain/goma.gni") 7 import("//build/toolchain/goma.gni")
8 import("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 9
10 # Should only be running on Windows. 10 # Should only be running on Windows.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 # toolchain_cpu: current_cpu to pass as a build arg 48 # toolchain_cpu: current_cpu to pass as a build arg
49 # toolchain_os: current_os to pass as a build arg 49 # toolchain_os: current_os to pass as a build arg
50 # environment: File name of environment file. 50 # environment: File name of environment file.
51 template("msvc_toolchain") { 51 template("msvc_toolchain") {
52 if (defined(invoker.concurrent_links)) { 52 if (defined(invoker.concurrent_links)) {
53 concurrent_links = invoker.concurrent_links 53 concurrent_links = invoker.concurrent_links
54 } 54 }
55 55
56 env = invoker.environment 56 env = invoker.environment
57 57
58 cl = invoker.cl 58 if (invoker.is_clang && host_os != "win") {
59 # This toolchain definition uses response files for compilations. GN uses
60 # the quoting rules of the host OS, while clang-cl always defaults to
61 # cmd.exe quoting rules for parsing response files. Tell clang-cl to use
62 # POSIX quoting rules, so it can understand what GN generates.
63 cl = "${invoker.cl} --rsp-quoting=posix"
64 } else {
65 cl = invoker.cl
66 }
59 67
60 if (use_lld) { 68 if (use_lld) {
61 if (host_os == "win") { 69 if (host_os == "win") {
62 lld_link = "lld-link.exe" 70 lld_link = "lld-link.exe"
63 } else { 71 } else {
64 lld_link = "lld-link" 72 lld_link = "lld-link"
65 } 73 }
66 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", 74 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
67 root_build_dir) 75 root_build_dir)
68 76
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 391
384 msvc_toolchain("winrt_x64") { 392 msvc_toolchain("winrt_x64") {
385 environment = "environment.winrt_x64" 393 environment = "environment.winrt_x64"
386 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" 394 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
387 is_clang = false 395 is_clang = false
388 396
389 toolchain_cpu = "x64" 397 toolchain_cpu = "x64"
390 toolchain_os = current_os 398 toolchain_os = current_os
391 } 399 }
392 } 400 }
OLDNEW
« 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