Skip to content

Commit

Permalink
ninja windows: workaround for too long names
Browse files Browse the repository at this point in the history
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)

BUG=276
TEST=

Review URL: https://chromiumcodereview.appspot.com/10665008

git-svn-id: http://gyp.googlecode.com/svn/trunk@1421 78cadc50-ecff-11dd-a971-7dbc132099af
  • Loading branch information
scottmg@chromium.org committed Jun 23, 2012
1 parent ec95517 commit a99188e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pylib/gyp/generator/ninja.py
Expand Up @@ -9,6 +9,7 @@
import gyp.MSVSVersion
import gyp.system_test
import gyp.xcode_emulation
import hashlib
import os.path
import re
import subprocess
Expand Down Expand Up @@ -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),
name)
Expand Down Expand Up @@ -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', []):
continue
Expand Down

0 comments on commit a99188e

Please sign in to comment.