diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-12-18 21:09:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-18 21:09:30 -0500 |
commit | aa66ef98ea6144abd2d2714fef1dfc8046e01775 (patch) | |
tree | eec266ba13ca4ee8c2c57095ae9e2867dc254ac5 /tools/setup.py | |
parent | 3dbd18af0950400eed7063bef7cb1f7ff27c4a01 (diff) |
travis: Set CARGO_HOME to third_party/rust_crates (#1370)
Adds prebuilt hyperfine and sccache binaries
Only build test_cc for LSAN
Add Cargo.lock
Only run benchmarks in master
Diffstat (limited to 'tools/setup.py')
-rwxr-xr-x | tools/setup.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/setup.py b/tools/setup.py index 81ef548d6..3ffc631df 100755 --- a/tools/setup.py +++ b/tools/setup.py @@ -7,6 +7,7 @@ import os import re import sys from distutils.spawn import find_executable +import prebuilt def main(): @@ -19,7 +20,6 @@ def main(): third_party.download_clang_format() third_party.download_clang() third_party.maybe_download_sysroot() - write_lastchange() mode = build_mode(default=None) @@ -113,8 +113,12 @@ def generate_gn_args(mode): if "DENO_BUILD_ARGS" in os.environ: out += os.environ["DENO_BUILD_ARGS"].split() + cacher = prebuilt.load_sccache() + if not os.path.exists(cacher): + cacher = find_executable("sccache") or find_executable("ccache") + # Check if ccache or sccache are in the path, and if so we set cc_wrapper. - cc_wrapper = find_executable("sccache") or find_executable("ccache") + cc_wrapper = cacher if 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))] @@ -124,7 +128,7 @@ def generate_gn_args(mode): out += ["treat_warnings_as_errors=false"] # Look for sccache; if found, set rustc_wrapper. - rustc_wrapper = find_executable("sccache") + rustc_wrapper = cacher if rustc_wrapper: out += ['rustc_wrapper=%s' % gn_string(rustc_wrapper)] |