Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1809)

Unified Diff: build/toolchain/win/BUILD.gn

Issue 738333002: Make goma work on win GN builds. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: update w/ review feedback Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/toolchain/win/BUILD.gn
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
index 87bd254ca8303b4a04e3cb59965ec34e1b9fa2a2..517d192033ee4892e424225185f5c6d95cd8339e 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -46,6 +46,14 @@ template("msvc_toolchain") {
configuration,
invoker.cpu_arch])
+ if (use_goma) {
+ goma_prefix = "$goma_dir/gomacc.exe "
+ } else {
+ goma_prefix = ""
+ }
+
+ cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\""
+
toolchain(target_name) {
# Make these apply to all tools below.
lib_switch = ""
@@ -54,7 +62,7 @@ template("msvc_toolchain") {
tool("cc") {
rspfile = "{{output}}.rsp"
pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb"
- command = "ninja -t msvc -e $env -- cl.exe /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
+ command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
depsformat = "msvc"
description = "CC {{output}}"
outputs = [
@@ -67,7 +75,7 @@ template("msvc_toolchain") {
rspfile = "{{output}}.rsp"
# The PDB name needs to be different between C and C++ compiled files.
pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb"
- command = "ninja -t msvc -e $env -- cl.exe /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
+ command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
depsformat = "msvc"
description = "CXX {{output}}"
outputs = [

Powered by Google App Engine
This is Rietveld 408576698