Bug 834228 - Force a stage-package to run before buildsymbols on universal builds. r=ted,gps

Also, always strip and elfhack executables, so that running make package after
a PKG_SKIP_STRIP=1 stage-package does strip ; but disable both for l10n-repacks
and unpack.
This commit is contained in:
Mike Hommey 2013-01-25 00:40:13 +01:00
Родитель 2acffd00d8
Коммит 7a21175d92
5 изменённых файлов: 15 добавлений и 4 удалений

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

@ -23,10 +23,14 @@ core_abspath = $(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1))
DIST = $(OBJDIR)/dist
postflight_all:
ifdef ENABLE_TESTS
mkdir -p $(DIST_UNI)/$(MOZ_PKG_APPNAME)
rm -f $(DIST_ARCH_2)/universal
ln -s $(call core_abspath,$(DIST_UNI)) $(DIST_ARCH_2)/universal
# Stage a package for buildsymbols to be happy. Doing so in OBJDIR_ARCH_1
# actually does a universal staging with both OBJDIR_ARCH_1 and OBJDIR_ARCH_2.
$(MAKE) -C $(OBJDIR_ARCH_1)/$(INSTALLER_DIR) \
PKG_SKIP_STRIP=1 stage-package
ifdef ENABLE_TESTS
# Now, repeat the process for the test package.
$(MAKE) -C $(OBJDIR_ARCH_1) UNIVERSAL_BINARY= CHROME_JAR= package-tests
$(MAKE) -C $(OBJDIR_ARCH_2) UNIVERSAL_BINARY= CHROME_JAR= package-tests

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

@ -139,8 +139,7 @@ class ExecutableFile(File):
'''
def copy(self, dest):
assert isinstance(dest, basestring)
if not File.copy(self, dest):
return False
File.copy(self, dest)
try:
if may_strip(dest):
strip(dest)

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

@ -10,6 +10,7 @@ from mozpack.files import (
)
from mozpack.executables import (
MACHO_SIGNATURES,
may_strip,
strip,
)
from mozpack.errors import errors
@ -58,7 +59,8 @@ class UnifiedExecutableFile(BaseFile):
os.close(fd)
tmpfiles.append(f)
shutil.copy2(p, f)
strip(f)
if may_strip(f):
strip(f)
subprocess.call(['lipo', '-create'] + tmpfiles + ['-output', dest])
finally:
for f in tmpfiles:

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

@ -32,6 +32,7 @@ from mozpack.errors import errors
from mozpack.packager.unpack import UnpackFinder
from createprecomplete import generate_precomplete
from argparse import ArgumentParser
import buildconfig
# Set of files or directories not listed in a chrome.manifest but that are
# localized.
@ -186,6 +187,8 @@ def main():
help='Extra files not to be considered as resources')
args = parser.parse_args()
buildconfig.substs['USE_ELF_HACK'] = False
buildconfig.substs['PKG_SKIP_STRIP'] = True
repack(args.build, args.l10n, args.non_resource)
if __name__ == "__main__":

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

@ -5,6 +5,7 @@
import sys
import os
from mozpack.packager.unpack import unpack
import buildconfig
def main():
if len(sys.argv) != 2:
@ -12,6 +13,8 @@ def main():
os.path.basename(sys.argv[0])
sys.exit(1)
buildconfig.substs['USE_ELF_HACK'] = False
buildconfig.substs['PKG_SKIP_STRIP'] = True
unpack(sys.argv[1])
if __name__ == "__main__":