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

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

Issue 2192643002: Make sure PDB files are in runtime_deps for GN builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: we generate pdbs even when symbol_level==1 Created 4 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 | components/nacl/broker/BUILD.gn » ('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 5e61c02082c2f8a4df40c8400c1aa1b65d57ca17..7d0b7d232f5237184d1aedd2577c075e502745fc 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/win/visual_studio_version.gni")
import("//build/toolchain/goma.gni")
@@ -179,9 +180,10 @@ template("msvc_toolchain") {
tool("solink") {
dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # e.g. foo.dll
libname = "${dllname}.lib" # e.g. foo.dll.lib
+ pdbname = "${dllname}.pdb"
rspfile = "${dllname}.rsp"
- command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile"
+ command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:$pdbname @$rspfile"
default_output_extension = ".dll"
default_output_dir = "{{root_out_dir}}"
@@ -193,6 +195,10 @@ template("msvc_toolchain") {
link_output = libname
depend_output = libname
runtime_outputs = [ dllname ]
+ if (symbol_level != 0) {
+ outputs += [ pdbname ]
+ runtime_outputs += [ pdbname ]
+ }
# Since the above commands only updates the .lib file when it changes, ask
# Ninja to check if the timestamp actually changed to know if downstream
@@ -206,9 +212,10 @@ template("msvc_toolchain") {
tool("solink_module") {
dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # e.g. foo.dll
+ pdbname = "${dllname}.pdb"
rspfile = "${dllname}.rsp"
- command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile"
+ command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /DLL /OUT:$dllname /PDB:$pdbname @$rspfile"
default_output_extension = ".dll"
default_output_dir = "{{root_out_dir}}"
@@ -216,6 +223,10 @@ template("msvc_toolchain") {
outputs = [
dllname,
]
+ if (symbol_level != 0) {
+ outputs += [ pdbname ]
+ }
+ runtime_outputs = outputs
# The use of inputs_newline is to work around a fixed per-line buffer
# size in the linker.
@@ -223,16 +234,22 @@ template("msvc_toolchain") {
}
tool("link") {
- rspfile = "{{output}}.rsp"
+ exename = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
+ pdbname = "$exename.pdb"
+ rspfile = "$exename.rsp"
- command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile"
+ command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo /OUT:$exename /PDB:$pdbname @$rspfile"
default_output_extension = ".exe"
default_output_dir = "{{root_out_dir}}"
description = "LINK {{output}}"
outputs = [
- "{{output_dir}}/{{target_output_name}}{{output_extension}}",
+ exename,
]
+ if (symbol_level != 0) {
+ outputs += [ pdbname ]
+ }
+ runtime_outputs = outputs
# The use of inputs_newline is to work around a fixed per-line buffer
# size in the linker.
« no previous file with comments | « no previous file | components/nacl/broker/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698