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

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

Issue 10269012: ninja windows: sanitize rule names to not emit corrupt .ninja files (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: line endings 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 | test/sanitize-rule-names/blah.X » ('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 d66cee11e80896b4a41b8d2e04603e8a6e336351..3662e491b440e4b3d288ec1acd161afb2c8a18ce 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -12,6 +12,7 @@ import gyp.xcode_emulation
import os.path
import re
import subprocess
+import string
import sys
import gyp.ninja_syntax as ninja_syntax
@@ -1069,7 +1070,7 @@ class NinjaWriter:
if self.toolset == 'target':
rule_name += '.' + self.toolset
rule_name += '.' + name
- rule_name = rule_name.replace(' ', '_')
+ rule_name = rule_name.translate(string.maketrans(' ()', '___'))
args = args[:]
« no previous file with comments | « no previous file | test/sanitize-rule-names/blah.X » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698