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

Unified Diff: pylib/gyp/generator/ninja.py

Issue 10228016: ninja windows: fix expansion of some VS macros (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: refactor test to not include case normalization Created 8 years, 8 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 | pylib/gyp/msvs_emulation.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 54c79e5c28b3669647a19bd5b01ef558379a4d45..13548341ac1bc49cf5a7100ef47c58fb1442b360 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -484,7 +484,7 @@ class NinjaWriter:
# Actions cd into the base directory.
env = self.GetXcodeEnv()
if self.flavor == 'win':
- env = self.msvs_settings.GetVSMacroEnv(self.base_to_build)
+ env = self.msvs_settings.GetVSMacroEnv('$!PRODUCT_DIR')
all_outputs = []
for action in actions:
# First write out a rule for the action.
@@ -814,8 +814,7 @@ class NinjaWriter:
self.WriteVariableList(
'libflags', gyp.common.uniquer(map(self.ExpandSpecial, libflags)))
ldflags = self.msvs_settings.GetLdflags(config_name,
- self.ExpandSpecial(generator_default_variables['PRODUCT_DIR']),
- self.GypPathToNinja)
+ self.GypPathToNinja, self.ExpandSpecial)
else:
ldflags = config.get('ldflags', [])
self.WriteVariableList('ldflags',
@@ -1015,9 +1014,10 @@ class NinjaWriter:
type = spec['type']
if self.flavor == 'win':
- overridden_name = self.msvs_settings.GetOutputName(spec, self.config_name)
- if overridden_name:
- return self.ExpandSpecial(overridden_name, self.base_to_build)
+ override = self.msvs_settings.GetOutputName(self.config_name,
+ self.ExpandSpecial)
+ if override:
+ return override
if self.flavor == 'mac' and type in (
'static_library', 'executable', 'shared_library', 'loadable_module'):
@@ -1278,7 +1278,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
command=('cmd /s /c "$cc /nologo /showIncludes '
'@$out.rsp '
'$cflags_pch_c /c $in /Fo$out /Fd$pdbname '
- '| ninja-deplist-helper -q -f cl -o $out.dl"'),
+ '| ninja-deplist-helper -r . -q -f cl -o $out.dl"'),
deplist='$out.dl',
rspfile='$out.rsp',
rspfile_content='$defines $includes $cflags $cflags_c')
@@ -1288,7 +1288,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
command=('cmd /s /c "$cxx /nologo /showIncludes '
'@$out.rsp '
'$cflags_pch_cc /c $in /Fo$out /Fd$pdbname '
- '| ninja-deplist-helper -q -f cl -o $out.dl"'),
+ '| ninja-deplist-helper -r . -q -f cl -o $out.dl"'),
deplist='$out.dl',
rspfile='$out.rsp',
rspfile_content='$defines $includes $cflags $cflags_cc')
« no previous file with comments | « no previous file | pylib/gyp/msvs_emulation.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698