mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
tools/setup: don't download sccache if --no-binary-download is passed
This commit is contained in:
parent
15dadf812c
commit
0e780e8948
2 changed files with 11 additions and 11 deletions
|
@ -18,23 +18,22 @@ def download_prebuilt(sha1_file):
|
||||||
env=google_env())
|
env=google_env())
|
||||||
|
|
||||||
|
|
||||||
def load_sccache():
|
def get_platform_path(tool):
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
p = "prebuilt/win/sccache.exe"
|
return "prebuilt/win/" + tool + ".exe"
|
||||||
elif sys.platform.startswith('linux'):
|
elif sys.platform.startswith('linux'):
|
||||||
p = "prebuilt/linux64/sccache"
|
return "prebuilt/linux64/" + tool
|
||||||
elif sys.platform == 'darwin':
|
elif sys.platform == 'darwin':
|
||||||
p = "prebuilt/mac/sccache"
|
return "prebuilt/mac/" + tool
|
||||||
|
|
||||||
|
|
||||||
|
def load_sccache():
|
||||||
|
p = get_platform_path("sccache")
|
||||||
download_prebuilt(p + ".sha1")
|
download_prebuilt(p + ".sha1")
|
||||||
return os.path.join(root_path, p)
|
return os.path.join(root_path, p)
|
||||||
|
|
||||||
|
|
||||||
def load_hyperfine():
|
def load_hyperfine():
|
||||||
if sys.platform == 'win32':
|
p = get_platform_path("hyperfine")
|
||||||
p = "prebuilt/win/hyperfine.exe"
|
|
||||||
elif sys.platform.startswith('linux'):
|
|
||||||
p = "prebuilt/linux64/hyperfine"
|
|
||||||
elif sys.platform == 'darwin':
|
|
||||||
p = "prebuilt/mac/hyperfine"
|
|
||||||
download_prebuilt(p + ".sha1")
|
download_prebuilt(p + ".sha1")
|
||||||
return os.path.join(root_path, p)
|
return os.path.join(root_path, p)
|
||||||
|
|
|
@ -31,6 +31,7 @@ def main():
|
||||||
third_party.download_clang_format()
|
third_party.download_clang_format()
|
||||||
third_party.download_clang()
|
third_party.download_clang()
|
||||||
third_party.maybe_download_sysroot()
|
third_party.maybe_download_sysroot()
|
||||||
|
prebuilt.load_sccache()
|
||||||
|
|
||||||
write_lastchange()
|
write_lastchange()
|
||||||
|
|
||||||
|
@ -125,7 +126,7 @@ 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 = prebuilt.load_sccache()
|
cacher = os.path.join(root_path, prebuilt.get_platform_path("sccache"))
|
||||||
if not os.path.exists(cacher):
|
if not os.path.exists(cacher):
|
||||||
cacher = find_executable("sccache") or find_executable("ccache")
|
cacher = find_executable("sccache") or find_executable("ccache")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue