Bug 1262231 - Fix handling of ICU for artifact builds. r=nalexander draft
authorChris Manchester <cmanchester@mozilla.com>
Tue, 05 Apr 2016 13:00:21 -0700
changeset 347789 2d1200a72dadb3e0e8211fa58d3f07bc2453061f
parent 347788 b65d504944ef45c9dd33ae45b922f5f438c12867
child 517699 ce2819024c43af27a01c860fec3cdc50f8674b62
push id14656
push usercmanchester@mozilla.com
push dateTue, 05 Apr 2016 20:00:57 +0000
reviewersnalexander
bugs1262231, 1239083
milestone48.0a1
Bug 1262231 - Fix handling of ICU for artifact builds. r=nalexander The data file is required as of bug 1239083. MozReview-Commit-ID: XhETIoUYH8
build/autoconf/icu.m4
python/mozbuild/mozbuild/artifacts.py
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -92,17 +92,17 @@ fi
 
 AC_SUBST(MOZ_ICU_VERSION)
 AC_SUBST(ENABLE_INTL_API)
 AC_SUBST(USE_ICU)
 AC_SUBST(ICU_DATA_FILE)
 AC_SUBST(MOZ_ICU_DATA_ARCHIVE)
 
 if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
-    if test -z "$YASM" -a -z "$GNU_AS"; then
+    if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
       AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api])
     fi
     dnl We build ICU as a static library.
     AC_DEFINE(U_STATIC_IMPLEMENTATION)
     dnl Source files that use ICU should have control over which parts of the ICU
     dnl namespace they want to use.
     AC_DEFINE(U_USING_ICU_NAMESPACE,0)
 fi
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -210,16 +210,17 @@ class LinuxArtifactJob(ArtifactJob):
         'firefox/crashreporter',
         'firefox/dependentlibs.list',
         'firefox/firefox',
         'firefox/firefox-bin',
         'firefox/platform.ini',
         'firefox/firefox-webcontent',
         'firefox/updater',
         'firefox/**/*.so',
+        mozpath.join('firefox', buildconfig.substs.get('ICU_DATA_FILE')),
     }
 
     def process_package_artifact(self, filename, processed_filename):
         added_entry = False
 
         with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
             with tarfile.open(filename) as reader:
                 for f in reader:
@@ -301,16 +302,17 @@ class MacArtifactJob(ArtifactJob):
             # These get copied into dist/bin with the path, so "root/a/b/c" -> "dist/bin/a/b/c".
             paths_keep_path = ('Contents/Resources', [
                 'browser/components/libbrowsercomps.dylib',
                 'dependentlibs.list',
                 # 'firefox',
                 'gmp-clearkey/0.1/libclearkey.dylib',
                 # 'gmp-fake/1.0/libfake.dylib',
                 # 'gmp-fakeopenh264/1.0/libfakeopenh264.dylib',
+                buildconfig.substs.get('ICU_DATA_FILE'),
             ])
 
             with JarWriter(file=processed_filename, optimize=False, compress_level=5) as writer:
                 root, paths = paths_no_keep_path
                 finder = FileFinder(mozpath.join(source, root))
                 for path in paths:
                     for p, f in finder.find(path):
                         self.log(logging.INFO, 'artifact',
@@ -341,16 +343,17 @@ class MacArtifactJob(ArtifactJob):
 
 class WinArtifactJob(ArtifactJob):
     package_artifact_patterns = {
         'firefox/dependentlibs.list',
         'firefox/platform.ini',
         'firefox/application.ini',
         'firefox/**/*.dll',
         'firefox/*.exe',
+        mozpath.join('firefox', buildconfig.substs.get('ICU_DATA_FILE')),
     }
     # These are a subset of TEST_HARNESS_BINS in testing/mochitest/Makefile.in.
     test_artifact_patterns = {
         ('bin/BadCertServer.exe', ('bin', 'bin')),
         ('bin/GenerateOCSPResponse.exe', ('bin', 'bin')),
         ('bin/OCSPStaplingServer.exe', ('bin', 'bin')),
         ('bin/certutil.exe', ('bin', 'bin')),
         ('bin/fileid.exe', ('bin', 'bin')),