summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-04 00:27:35 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-04 00:27:35 +0000
commita34f9bed8c1d0a158bb860ba325d7a566045f71b (patch)
treef00dd171c63027503698dd75e93f6c1ea2678fd4 /build
parenteb4a7974c18bd043668b4492ee565ed035b214b7 (diff)
downloadchromium_src-a34f9bed8c1d0a158bb860ba325d7a566045f71b.zip
chromium_src-a34f9bed8c1d0a158bb860ba325d7a566045f71b.tar.gz
chromium_src-a34f9bed8c1d0a158bb860ba325d7a566045f71b.tar.bz2
Convert GN hyphens to underscores when passing command line args.
Some GYP variables are named like "pkg-config" Replace - with _ when doing converting GN variable names. TBR=michaeln Review URL: https://codereview.chromium.org/103193003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@238494 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-xbuild/gyp_chromium6
1 files changed, 4 insertions, 2 deletions
diff --git a/build/gyp_chromium b/build/gyp_chromium
index 8409a28..2d13d15 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -79,12 +79,14 @@ def GetVarsStringForGN(supplemental_files):
items = shlex.split(env_string)
for item in items:
tokens = item.split('=', 1)
+ # Some GYP variables have hyphens, which we don't support.
+ key = tokens[0].replace("-", "_")
if len(tokens) == 2:
# Escape $ characters which have special meaning to GN.
- vars_dict[tokens[0]] = '"' + tokens[1].replace("$", "\\$") + '"'
+ vars_dict[key] = '"' + tokens[1].replace("$", "\\$") + '"'
else:
# No value supplied, treat it as a boolean and set it.
- vars_dict[tokens[0]] = 'true'
+ vars_dict[key] = 'true'
vars_string = ''
for v in vars_dict: