diff options
author | Bert Belder <bertbelder@gmail.com> | 2018-09-25 14:48:07 -0700 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2018-09-26 09:52:30 -0700 |
commit | 531a427d8810792df4c77f10c42945e2f7663ffb (patch) | |
tree | d129d27a4e046602ea6e4f3ed6dc001930c6a367 | |
parent | 023b4640fc4c8bf3efd4f5f8914552cdae6d142b (diff) |
build: do not quote cc_wrapper on windows
This brings behavior inline with the unix toolchain, which also leaves
cc_wrapper unquoted. If necessary, add quotes in the setup phase instead.
-rw-r--r-- | build_extra/toolchain/win/mods.gni | 4 | ||||
-rwxr-xr-x | tools/setup.py | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/build_extra/toolchain/win/mods.gni b/build_extra/toolchain/win/mods.gni index 5355d7f9a..30a936051 100644 --- a/build_extra/toolchain/win/mods.gni +++ b/build_extra/toolchain/win/mods.gni @@ -20,9 +20,9 @@ import("//build/toolchain/cc_wrapper.gni") # Some python scripts that are run by BUILD.gni live here. base_toolchain_dir = "//build/toolchain/win" -# If cc_wrapper if is set, wrap it in quotes and add a space to it. +# If cc_wrapper if is set, add a space to it. if (cc_wrapper == "") { cc_wrapper_prefix = "" } else { - cc_wrapper_prefix = "\"$cc_wrapper\" " + cc_wrapper_prefix = "$cc_wrapper " } diff --git a/tools/setup.py b/tools/setup.py index 1a0b491c0..a07a4c1b6 100755 --- a/tools/setup.py +++ b/tools/setup.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import third_party from util import build_mode, build_path, enable_ansi_colors, root_path, run +from util import shell_quote import os import re import sys @@ -114,7 +115,8 @@ def generate_gn_args(mode): # Check if ccache or sccache are in the path, and if so we set cc_wrapper. cc_wrapper = find_executable("ccache") or find_executable("sccache") if cc_wrapper: - out += ['cc_wrapper="%s"' % cc_wrapper] + # The gn toolchain does not shell escape cc_wrapper, so do it here. + out += ['cc_wrapper=%s' % gn_string(shell_quote(cc_wrapper))] # For cc_wrapper to work on Windows, we need to select our own toolchain # by overriding 'custom_toolchain' and 'host_toolchain'. # TODO: Is there a way to use it without the involvement of args.gn? |