diff options
author | Bert Belder <bertbelder@gmail.com> | 2018-09-07 20:19:44 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2018-09-08 23:55:18 +0200 |
commit | 30b268dd7d8da498c15907470bc5d7b642664317 (patch) | |
tree | fbfe7d79c80b2ad82c20f0402f08665ac5d55ba1 /tools/setup.py | |
parent | 3deaf99a92aeea347e1530f309fd4b226e9677d3 (diff) |
build: override host_toolchain on windows to use sccache with v8
Diffstat (limited to 'tools/setup.py')
-rwxr-xr-x | tools/setup.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/setup.py b/tools/setup.py index 9dff9eb20..737f80017 100755 --- a/tools/setup.py +++ b/tools/setup.py @@ -59,12 +59,13 @@ def get_gn_args(): # 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 += [r'cc_wrapper="%s"' % cc_wrapper] - # Windows needs a custom toolchain for cc_wrapper to work. + out += ['cc_wrapper="%s"' % 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? if os.name == "nt": - out += [ - 'custom_toolchain="//build_extra/toolchain/win:win_clang_x64"' - ] + tc = "//build_extra/toolchain/win:win_clang_x64" + out += ['custom_toolchain="%s"' % tc, 'host_toolchain="%s"' % tc] print "DENO_BUILD_ARGS:", out |