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

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

Issue 1846873002: Allow spaces in GN target names on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | 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 7c359b8128194af20cd39b72079f930ef7f0c8bb..c469c4302a20afc8b2a0ba079cbd2958a636b97c 100644
--- a/build/toolchain/win/BUILD.gn
+++ b/build/toolchain/win/BUILD.gn
@@ -74,7 +74,11 @@ template("msvc_toolchain") {
rspfile = "{{output}}.rsp"
precompiled_header_type = "msvc"
pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb"
- command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
+
+ # Label names may have spaces in them so the pdbname must be quoted. The
+ # source and output don't need to be quoted because GN knows they're a
+ # full file name and will quote automatically when necessary.
Dirk Pranke 2016/03/31 23:09:55 Ah. thank you.
+ command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
depsformat = "msvc"
description = "CC {{output}}"
outputs = [
@@ -89,7 +93,9 @@ template("msvc_toolchain") {
# The PDB name needs to be different between C and C++ compiled files.
pdbname = "{{target_out_dir}}/{{label_name}}_cc.pdb"
- command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd$pdbname"
+
+ # See comment in CC tool about quoting.
+ command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
depsformat = "msvc"
description = "CXX {{output}}"
outputs = [
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698