Index: build/toolchain/win/BUILD.gn |
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn |
index 87bd254ca8303b4a04e3cb59965ec34e1b9fa2a2..e9c52ca1e4c4530aa608bb63e50f28aee973589d 100644 |
--- a/build/toolchain/win/BUILD.gn |
+++ b/build/toolchain/win/BUILD.gn |
@@ -46,15 +46,34 @@ template("msvc_toolchain") { |
configuration, |
invoker.cpu_arch]) |
+ if (use_goma) { |
+ goma_prefix = "$goma_dir/gomacc.exe " |
+ } else { |
+ goma_prefix = "" |
+ } |
+ |
+ if (cpu_arch == "x86") { |
+ vc_bin = "\vc\bin\amd64_x86" |
+ } else { |
+ vc_bin = "\vc\bin\amd64" |
+ } |
Dirk Pranke
2014/11/20 03:47:13
Scott: is there a better way to get the right subd
scottmg
2014/11/20 04:58:34
Yes, setup_toolchain should probably do the same a
Dirk Pranke
2014/11/20 05:01:03
Okay, will fix.
|
+ cl = "${goma_prefix}\"${visual_studio_path}${vc_bin}/cl.exe\"" |
+ |
toolchain(target_name) { |
# Make these apply to all tools below. |
lib_switch = "" |
lib_dir_switch="/LIBPATH:" |
tool("cc") { |
+ if (use_goma) { |
scottmg
2014/11/20 04:58:34
you could probably just leave this to avoid the co
Dirk Pranke
2014/11/20 05:01:03
Okay, I'll doublecheck to make sure and always pas
|
+ pdb_flag = "" |
+ } else { |
+ pdb_flag = " /Fd{{target_out_dir}}/{{target_output_name}}_c.pdb" |
+ } |
+ |
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}}$pdb_flag" |
+ |
depsformat = "msvc" |
description = "CC {{output}}" |
outputs = [ |
@@ -64,10 +83,15 @@ template("msvc_toolchain") { |
} |
tool("cxx") { |
+ if (use_goma) { |
scottmg
2014/11/20 04:58:34
same
Dirk Pranke
2014/11/20 05:01:03
Acknowledged.
|
+ pdb_flag = "" |
+ } else { |
+ # The PDB name needs to be different between C and C++ compiled files. |
+ pdb_flag = " /Fd{{target_out_dir}}/{{target_output_name}}_cc.pdb" |
+ } |
+ |
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}}$pdb_flag" |
depsformat = "msvc" |
description = "CXX {{output}}" |
outputs = [ |