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

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

Issue 406453002: Hook up symbol files to the Windows GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tests Created 6 years, 5 months 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
« no previous file with comments | « no previous file | tools/gn/function_toolchain.cc » ('j') | 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 3f0d0d76262cd37fd10a750445bfc8cd9248029d..143aa0a0e293c9f13f48a1d1ccc85b3b0f6ea8a9 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -22,6 +22,11 @@ exec_script("setup_toolchain.py",
stamp_command = "$python_path gyp-win-tool stamp \$out"
copy_command = "$python_path gyp-win-tool recursive-mirror \$in \$out"
+# MSVC can't share PDB files between compilers compiling C and C++ files, so
+# we construct different names for each type.
+c_pdb_suffix = " /Fd\${target_out_dir}/\${target_name}_c.pdb"
+cc_pdb_suffix = " /Fd\${target_out_dir}/\${target_name}_cc.pdb"
+
# 32-bit toolchain -------------------------------------------------------------
toolchain("32") {
@@ -29,16 +34,16 @@ toolchain("32") {
lib_prefix = ""
lib_dir_prefix="/LIBPATH:"
- cc_command = "ninja -t msvc -e environment.x86 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname"
+ cc_command = "ninja -t msvc -e environment.x86 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out"
tool("cc") {
- command = cc_command
+ command = cc_command + c_pdb_suffix
description = "CC \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$defines \$includes \$cflags \$cflags_c"
depsformat = "msvc"
}
tool("cxx") {
- command = cc_command # Same as above
+ command = cc_command + cc_pdb_suffix
description = "CXX \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$defines \$includes \$cflags \$cflags_cc"
@@ -88,16 +93,16 @@ toolchain("64") {
lib_prefix = ""
lib_dir_prefix="/LIBPATH:"
- cc_command = "ninja -t msvc -e environment.x64 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname"
+ cc_command = "ninja -t msvc -e environment.x64 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out"
tool("cc") {
- command = cc_command
+ command = cc_command + c_pdb_suffix
description = "CC \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$defines \$includes \$cflags \$cflags_c"
depsformat = "msvc"
}
tool("cxx") {
- command = cc_command # Same as above
+ command = cc_command + cc_pdb_suffix
description = "CXX \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$defines \$includes \$cflags \$cflags_cc"
« no previous file with comments | « no previous file | tools/gn/function_toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698