Bug 1314546 - Always putenv(MOZ_LINKER_EXTRACT) for Android r=esawin,glandium
authorAndrzej Hunt <ahunt@mozilla.com>
Fri, 04 Nov 2016 15:48:58 +0100
changeset 321985 720cb3b359c98ef39da959199dabdc0800f1c6db
parent 321984 7c7e7ef60aeb2c5d64dbd53846bde2fabb71355e
child 321986 666b8f65e279ffb0a2b4c02c702beba3ecdfca4b
push id34120
push userahunt@mozilla.com
push dateThu, 10 Nov 2016 17:04:44 +0000
treeherderautoland@720cb3b359c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersesawin, glandium
bugs1314546
milestone52.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 1314546 - Always putenv(MOZ_LINKER_EXTRACT) for Android r=esawin,glandium This allows artifact builds to load the new compressed native libraries correctly, without requiring build config changes. MozReview-Commit-ID: 3xZzoV3wFda
mobile/android/base/AppConstants.java.in
mobile/android/base/moz.build
mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
--- a/mobile/android/base/AppConstants.java.in
+++ b/mobile/android/base/AppConstants.java.in
@@ -273,23 +273,16 @@ public class AppConstants {
 
     public static final boolean ANDROID_DOWNLOADS_INTEGRATION =
 //#ifdef MOZ_ANDROID_DOWNLOADS_INTEGRATION
     true;
 //#else
     false;
 //#endif
 
-    public static final boolean MOZ_LINKER_EXTRACT =
-//#ifdef MOZ_LINKER_EXTRACT
-    true;
-//#else
-    false;
-//#endif
-
     public static final boolean MOZ_DRAGGABLE_URLBAR = false;
 
     public static final boolean MOZ_INSTALL_TRACKING =
 //#ifdef MOZ_INSTALL_TRACKING
     true;
 //#else
     false;
 //#endif
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -1064,17 +1064,17 @@ if CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRE
         # it in the main APK as well.
         ANDROID_ASSETS_DIRS += [
             '%' + CONFIG['MOZ_ANDROID_DISTRIBUTION_DIRECTORY'] + '/assets',
         ]
 
 # We do not expose MOZ_ADJUST_SDK_KEY here because that # would leak the value
 # to build logs.  Instead we expose the token quietly where appropriate in
 # Makefile.in.
-for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_LINKER_EXTRACT', 'MOZ_DEBUG',
+for var in ('MOZ_ANDROID_ANR_REPORTER', 'MOZ_DEBUG',
             'MOZ_ANDROID_SEARCH_ACTIVITY', 'MOZ_NATIVE_DEVICES', 'MOZ_ANDROID_MLS_STUMBLER',
             'MOZ_ANDROID_DOWNLOADS_INTEGRATION', 'MOZ_INSTALL_TRACKING',
             'MOZ_ANDROID_GCM', 'MOZ_ANDROID_EXCLUDE_FONTS', 'MOZ_LOCALE_SWITCHER',
             'MOZ_ANDROID_BEAM', 'MOZ_ANDROID_DOWNLOAD_CONTENT_SERVICE',
             'MOZ_SWITCHBOARD', 'MOZ_ANDROID_CUSTOM_TABS',
             'MOZ_ANDROID_ACTIVITY_STREAM'):
     if CONFIG[var]:
         DEFINES[var] = 1
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java
@@ -194,25 +194,23 @@ public final class GeckoLoader {
         String forced_ondemand = System.getenv("MOZ_LINKER_ONDEMAND");
         if (forced_ondemand == null) {
             if ("HTC".equals(android.os.Build.MANUFACTURER) &&
                 "HTC Vision".equals(android.os.Build.MODEL)) {
                 putenv("MOZ_LINKER_ONDEMAND=0");
             }
         }
 
-        if (AppConstants.MOZ_LINKER_EXTRACT) {
-            putenv("MOZ_LINKER_EXTRACT=1");
-            // Ensure that the cache dir is world-writable
-            File cacheDir = new File(linkerCache);
-            if (cacheDir.isDirectory()) {
-                cacheDir.setWritable(true, false);
-                cacheDir.setExecutable(true, false);
-                cacheDir.setReadable(true, false);
-            }
+        putenv("MOZ_LINKER_EXTRACT=1");
+        // Ensure that the cache dir is world-writable
+        File cacheDir = new File(linkerCache);
+        if (cacheDir.isDirectory()) {
+            cacheDir.setWritable(true, false);
+            cacheDir.setExecutable(true, false);
+            cacheDir.setReadable(true, false);
         }
     }
 
     @RobocopTarget
     public synchronized static void loadSQLiteLibs(final Context context, final String apkName) {
         if (sSQLiteLibsLoaded) {
             return;
         }