2018-10-24 18:24:11 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-09-21 00:30:26 +00:00
|
|
|
From: John Kleinschmidt <jkleinsc@github.com>
|
|
|
|
Date: Thu, 20 Sep 2018 17:49:45 -0700
|
|
|
|
Subject: windows_cc_wrapper.patch
|
|
|
|
|
|
|
|
Allow use of cc_wrapper (eg sccache).
|
|
|
|
|
2018-09-14 05:02:16 +00:00
|
|
|
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
|
2018-10-24 18:24:11 +00:00
|
|
|
index eb3e2b2b377dde31e062be46837bf509ecab0325..5c014b190e121619056aa2eb7301887d47490d57 100644
|
2018-09-14 05:02:16 +00:00
|
|
|
--- a/build/toolchain/win/BUILD.gn
|
|
|
|
+++ b/build/toolchain/win/BUILD.gn
|
|
|
|
@@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni")
|
|
|
|
import("//build/config/compiler/compiler.gni")
|
|
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
|
|
|
import("//build/config/win/visual_studio_version.gni")
|
|
|
|
+import("//build/toolchain/cc_wrapper.gni")
|
|
|
|
import("//build/toolchain/clang_static_analyzer.gni")
|
|
|
|
import("//build/toolchain/goma.gni")
|
|
|
|
import("//build/toolchain/toolchain.gni")
|
|
|
|
@@ -28,8 +29,14 @@ if (use_goma) {
|
|
|
|
} else {
|
|
|
|
goma_prefix = "$goma_dir/gomacc "
|
|
|
|
}
|
|
|
|
+ clang_prefix = goma_prefix
|
|
|
|
} else {
|
|
|
|
goma_prefix = ""
|
|
|
|
+ if (cc_wrapper != "") {
|
|
|
|
+ clang_prefix = cc_wrapper + " "
|
|
|
|
+ } else {
|
|
|
|
+ clang_prefix = ""
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
|
2018-09-14 18:03:43 +00:00
|
|
|
# Copy the VS runtime DLL for the default toolchain to the root build directory
|
2018-10-26 07:22:59 +00:00
|
|
|
@@ -392,7 +399,7 @@ if (win_build_host_cpu != "x64") {
|
2018-09-14 18:03:43 +00:00
|
|
|
msvc_toolchain("win_clang_" + win_build_host_cpu) {
|
|
|
|
environment = "environment." + win_build_host_cpu
|
2018-09-14 05:02:16 +00:00
|
|
|
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
|
|
|
|
- cl = "${goma_prefix}$prefix/${clang_cl}"
|
|
|
|
+ cl = "${clang_prefix}$prefix/${clang_cl}"
|
2018-09-14 18:03:43 +00:00
|
|
|
sys_include_flags = "${build_cpu_toolchain_data.include_flags_imsvc}"
|
2018-09-21 00:30:26 +00:00
|
|
|
if (host_os != "win") {
|
|
|
|
# For win cross build.
|
2018-10-26 07:22:59 +00:00
|
|
|
@@ -441,7 +448,7 @@ template("win_x64_toolchains") {
|
2018-09-14 05:02:16 +00:00
|
|
|
msvc_toolchain("win_clang_" + target_name) {
|
|
|
|
environment = "environment.x64"
|
|
|
|
prefix = rebase_path("$clang_base_path/bin", root_build_dir)
|
|
|
|
- cl = "${goma_prefix}$prefix/${clang_cl}"
|
|
|
|
+ cl = "${clang_prefix}$prefix/${clang_cl}"
|
|
|
|
sys_include_flags = "${x64_toolchain_data.include_flags_imsvc}"
|
2018-09-21 00:30:26 +00:00
|
|
|
if (host_os != "win") {
|
|
|
|
# For win cross build
|