1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-15 16:43:44 -05:00
denoland-deno/build_extra/toolchain/win/mods.gni
Bert Belder 3bcf7e271f
Build: make it possible to use ccache/sccache on windows
Also auto-detect the availability of sccache in setup.py.
2018-08-25 14:16:41 +02:00

28 lines
1.1 KiB
Text

# Copyright 2018 the Deno authors. All rights reserved. MIT license.
# The toolchain definitions in BUILD.gn are derived from Chromium's default
# Windows toolchain. The only difference is that the 'cc_wrapper' build option
# is honored, so we can use ccache or an equivalent tool.
#
# 'BUILD.gn' was generated as follows (using GNU sed):
#
# (echo -e '# Automatically generated. See mods.gni.\n' |
# cat - ../../../build/toolchain/win/BUILD.gn |
# sed '0,/import/s|import|import("mods.gni")\n&|' |
# sed 's|exec_script("|&$base_toolchain_dir/|' |
# sed 's|${goma_prefix}|&${cc_wrapper_prefix}|' ) > BUILD.gn
# gn format BUILD.gn
# Ensure the 'cc_wrapper' variable is in scope.
import("//build/toolchain/cc_wrapper.gni")
# Location of the original toolchain definition that this one is derived from.
# Some python scripts that are run by BUILD.gni live here.
base_toolchain_dir = "//build/toolchain/win"
# If cc_wrapper if is set, wrap it in quotes and add a space to it.
if (cc_wrapper == "") {
cc_wrapper_prefix = ""
} else {
cc_wrapper_prefix = "\"$cc_wrapper\" "
}