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

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: fix pdb flags 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
« build/config/BUILDCONFIG.gn ('K') | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 = [
« build/config/BUILDCONFIG.gn ('K') | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698