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

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

Issue 10665008: ninja windows: workaround for too long names (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: hash rule_name too :( Created 8 years, 6 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: pylib/gyp/generator/ninja.py
diff --git a/pylib/gyp/generator/ninja.py b/pylib/gyp/generator/ninja.py
index 2def4b1c18817348bb4bd1de90ec8ec4f44a3bad..5a4777e7d49b7f9dbaed894f14fa489e08da37b5 100644
--- a/pylib/gyp/generator/ninja.py
+++ b/pylib/gyp/generator/ninja.py
@@ -9,6 +9,7 @@ import gyp.msvs_emulation
import gyp.MSVSVersion
import gyp.system_test
import gyp.xcode_emulation
+import hashlib
import os.path
import re
import subprocess
@@ -616,7 +617,7 @@ class NinjaWriter:
inputs = map(self.GypPathToNinja, inputs)
outputs = map(self.GypPathToNinja, outputs)
extra_bindings.append(('unique_name',
- re.sub('[^a-zA-Z0-9_]', '_', outputs[0])))
+ hashlib.md5(re.sub('[^a-zA-Z0-9_]', '_', outputs[0])).hexdigest()))
self.ninja.build(outputs, rule_name, self.GypPathToNinja(source),
implicit=inputs,
order_only=prebuild,
@@ -1101,7 +1102,7 @@ class NinjaWriter:
if self.toolset == 'target':
rule_name += '.' + self.toolset
rule_name += '.' + name
- rule_name = re.sub('[^a-zA-Z0-9_]', '_', rule_name)
+ rule_name = hashlib.md5(re.sub('[^a-zA-Z0-9_]', '_', rule_name)).hexdigest()
args = args[:]
« 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