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 = [ |