1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00

tools: fix cc_wrapper in setup.py (#3017)

This commit is contained in:
Christian Moritz 2019-09-24 21:19:23 +02:00 committed by Ryan Dahl
parent 2201414a7a
commit 726f08694b

View file

@ -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":