mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
tools: fix cc_wrapper in setup.py (#3017)
This commit is contained in:
parent
2201414a7a
commit
726f08694b
1 changed files with 5 additions and 6 deletions
|
@ -127,13 +127,12 @@ def generate_gn_args(mode):
|
||||||
if "DENO_BUILD_ARGS" in os.environ:
|
if "DENO_BUILD_ARGS" in os.environ:
|
||||||
out += os.environ["DENO_BUILD_ARGS"].split()
|
out += os.environ["DENO_BUILD_ARGS"].split()
|
||||||
|
|
||||||
cacher = find_executable("sccache")
|
# Check if sccache is in the path, and if so we set cc_wrapper.
|
||||||
if not os.path.exists(cacher):
|
cc_wrapper = find_executable("sccache")
|
||||||
cacher = third_party.get_prebuilt_tool_path("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.
|
if os.path.exists(cc_wrapper):
|
||||||
cc_wrapper = cacher
|
|
||||||
if cc_wrapper:
|
|
||||||
# The gn toolchain does not shell escape cc_wrapper, so do it here.
|
# The gn toolchain does not shell escape cc_wrapper, so do it here.
|
||||||
out += ['cc_wrapper=%s' % gn_string(shell_quote(cc_wrapper))]
|
out += ['cc_wrapper=%s' % gn_string(shell_quote(cc_wrapper))]
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
|
|
Loading…
Reference in a new issue