Skip to content
Browse files

ninja windows: workaround for too long names

Hash rule_name/unique_name for now to make the path shorter and get builds working again. We should come up with a better way of doing this in general.

(Jay was running into this problem, and found this to be a reasonable/working workaround)


Review URL:

git-svn-id: 78cadc50-ecff-11dd-a971-7dbc132099af
  • Loading branch information...
1 parent ec95517 commit a99188e0166d99d66b12ce0c08fb1dc1bd171321 committed Jun 23, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 pylib/gyp/generator/
7 pylib/gyp/generator/
@@ -9,6 +9,7 @@
import gyp.MSVSVersion
import gyp.system_test
import gyp.xcode_emulation
+import hashlib
import os.path
import re
import subprocess
@@ -510,7 +511,8 @@ def WriteActions(self, actions, extra_sources, prebuild,
all_outputs = []
for action in actions:
# First write out a rule for the action.
- name = '%s_%s' % (self.qualified_target, action['action_name'])
+ name = '%s_%s' % (action['action_name'],
+ hashlib.md5(self.qualified_target).hexdigest())
description = self.GenerateDescription('ACTION',
action.get('message', None),
@@ -543,7 +545,8 @@ def WriteRules(self, rules, extra_sources, prebuild,
all_outputs = []
for rule in rules:
# First write out a rule for the rule action.
- name = '%s_%s' % (self.qualified_target, rule['rule_name'])
+ name = '%s_%s' % (rule['rule_name'],
+ hashlib.md5(self.qualified_target).hexdigest())
# Skip a rule with no action and no inputs.
if 'action' not in rule and not rule.get('rule_sources', []):

0 comments on commit a99188e

Please sign in to comment.
Something went wrong with that request. Please try again.