Bug 991449: Shorten Unified filename prefixes to avoid max path length linker errors on Windows, r=gps
authorJoshua Cranmer <Pidgeot18@gmail.com>
Thu, 03 Apr 2014 16:50:31 -0500
changeset 176986 18cf30214a10beeb563a6448ef91df0b0005a47b
parent 176985 904297de3d1e7120e117cc3ce05bc81ba98cd8ad
child 176987 5fb973d5e27609c19c2ab6772c514206fb9058ba
push id41888
push userPidgeot18@gmail.com
push dateThu, 03 Apr 2014 21:51:33 +0000
treeherdermozilla-inbound@18cf30214a10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs991449
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 991449: Shorten Unified filename prefixes to avoid max path length linker errors on Windows, r=gps
python/mozbuild/mozbuild/backend/recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -374,18 +374,18 @@ class RecursiveMakeBackend(CommonBackend
 
             # Sorted so output is consistent and we don't bump mtimes.
             for k, v in sorted(obj.variables.items()):
                 if k in unified_suffixes:
                     if do_unify:
                         # On Windows, path names have a maximum length of 255 characters,
                         # so avoid creating extremely long path names.
                         unified_prefix = backend_file.relobjdir
-                        if len(unified_prefix) > 30:
-                            unified_prefix = unified_prefix[-30:].split('/', 1)[-1]
+                        if len(unified_prefix) > 20:
+                            unified_prefix = unified_prefix[-20:].split('/', 1)[-1]
                         unified_prefix = unified_prefix.replace('/', '_')
 
                         self._add_unified_build_rules(backend_file, v,
                             backend_file.objdir,
                             unified_prefix='Unified_%s_%s' % (
                                 unified_suffixes[k],
                                 unified_prefix),
                             unified_suffix=unified_suffixes[k],