Bug 940708 - Part 4: Limit the length of the unified file name prefix to 50 characters so that we don't blow up the Windows path name limit; r=glandium

--HG--
extra : rebase_source : 7f28ada75a26132af951893137127e0f1517995b
This commit is contained in:
Ehsan Akhgari 2013-12-18 21:55:19 -05:00
Родитель 6da57e25bc
Коммит 002501e54b
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -373,11 +373,18 @@ class RecursiveMakeBackend(CommonBackend):
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) > 39:
unified_prefix = unified_prefix[-39:].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],
backend_file.relobjdir.replace('/', '_')),
unified_prefix),
unified_suffix=unified_suffixes[k],
unified_files_makefile_variable=k,
include_curdir_build_rules=False,