diff options
Diffstat (limited to 'build_extra/toolchain/win/mods.gni')
-rw-r--r-- | build_extra/toolchain/win/mods.gni | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/build_extra/toolchain/win/mods.gni b/build_extra/toolchain/win/mods.gni new file mode 100644 index 000000000..5355d7f9a --- /dev/null +++ b/build_extra/toolchain/win/mods.gni @@ -0,0 +1,28 @@ +# 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\" " +} |