| 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"
|
|
|