diff options
author | Christian Moritz <chrmoritz@users.noreply.github.com> | 2019-09-24 21:19:23 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-09-24 15:19:23 -0400 |
commit | 726f08694b4d27a06dee7fbbef3a574a7c2c0053 (patch) | |
tree | 7c1ab6ed5d6b5d23816ce70b1020b490fbb7c6cf /tools/setup.py | |
parent | 2201414a7a3b300484431ff223e536335cc70ea8 (diff) |
tools: fix cc_wrapper in setup.py (#3017)
Diffstat (limited to 'tools/setup.py')
-rwxr-xr-x | tools/setup.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/setup.py b/tools/setup.py index b6c8cac92..e18b5ffd3 100755 --- a/tools/setup.py +++ b/tools/setup.py @@ -127,13 +127,12 @@ def generate_gn_args(mode): if "DENO_BUILD_ARGS" in os.environ: out += os.environ["DENO_BUILD_ARGS"].split() - cacher = find_executable("sccache") - if not os.path.exists(cacher): - cacher = third_party.get_prebuilt_tool_path("sccache") + # Check if sccache is in the path, and if so we set cc_wrapper. + cc_wrapper = find_executable("sccache") + if not cc_wrapper: + cc_wrapper = third_party.get_prebuilt_tool_path("sccache") - # Check if ccache or sccache are in the path, and if so we set cc_wrapper. - cc_wrapper = cacher - if cc_wrapper: + if os.path.exists(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))] if os.name == "nt": |