Bug 1372697 - Consolidate main mozconfig for Linux64; r?glandium draft
authorGregory Szorc <gps@mozilla.com>
Tue, 18 Jul 2017 17:51:12 -0700
changeset 610955 8fff22819b8b2e776544ce98f12ead3784cf6753
parent 610954 a763b77f455072094165d97a2601c20e7c700f75
child 638018 b0e10683a907b137ed725d0a2a73da04d4fab6a9
push id69066
push userbmo:gps@mozilla.com
push dateWed, 19 Jul 2017 00:57:27 +0000
reviewersglandium
bugs1372697
milestone56.0a1
Bug 1372697 - Consolidate main mozconfig for Linux64; r?glandium Currently, we have per-channel mozconfigs for many platforms, including Linux64. This creates an explosion of mozconfig variants. In addition, the mechanism by which these mozconfigs are activated is by differing the main mozconfig according to the repo that scheduled the job. This is currently done in mozharness in the branch_specifics.py file. This commit moves us a step closer to doing away with repo-specific mozconfigs by consolidating the per-repo/channel mozconfig differences into a single file. The "nightly" mozconfig has been renamed to "main." Inside, it has grown conditional branches that take into account the recently-introduced MOZ_BUILD_CHANNEL environment variable to incorporate the logic from the now-deleted "beta" and "release" mozconfigs. References to the old mozconfigs have been purged or updated as necessary. It's worth noting that the consolidation of the mozconfigs combined with MOZ_BUILD_CHANNEL dictating behavior means that certain mozconfigs previously including the "nightly" mozconfig (such as opt-dmd) will now inherit the "beta" or "release" channel configuration instead of the "nightly" one. This is arguably a feature, not a bug. However, it will likely result in unintentional fallout. MozReview-Commit-ID: LJHQTLyBjxE
browser/config/mozconfigs/linux64/add-on-devel
browser/config/mozconfigs/linux64/beta
browser/config/mozconfigs/linux64/code-coverage
browser/config/mozconfigs/linux64/main
browser/config/mozconfigs/linux64/nightly
browser/config/mozconfigs/linux64/opt-dmd
browser/config/mozconfigs/linux64/release
browser/config/mozconfigs/linux64/stylo
browser/config/mozconfigs/linux64/valgrind
testing/mozharness/configs/builds/branch_specifics.py
testing/mozharness/configs/builds/releng_base_linux_64_builds.py
testing/mozharness/configs/merge_day/central_to_beta.py
--- a/browser/config/mozconfigs/linux64/add-on-devel
+++ b/browser/config/mozconfigs/linux64/add-on-devel
@@ -1,9 +1,9 @@
-. $topsrcdir/browser/config/mozconfigs/linux64/nightly
+. $topsrcdir/browser/config/mozconfigs/linux64/main
 
 #add-on signing is checked but not enforced
 MOZ_REQUIRE_SIGNING=0
 ac_add_options --with-branding=browser/branding/unofficial
 ac_add_options --enable-update-channel=default
 
 # Need this to prevent name conflicts with the normal nightly build packages
 export MOZ_PKG_SPECIAL=add-on-devel
deleted file mode 100644
--- a/browser/config/mozconfigs/linux64/beta
+++ /dev/null
@@ -1,13 +0,0 @@
-if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
-  MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
-  MOZ_AUTOMATION_UPDATE_PACKAGING=1
-fi
-
-. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
-
-ac_add_options --enable-official-branding
-ac_add_options --enable-verify-mar
-
-mk_add_options MOZ_PGO=1
-
-. "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/linux64/code-coverage
+++ b/browser/config/mozconfigs/linux64/code-coverage
@@ -1,9 +1,9 @@
-. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+. "$topsrcdir/browser/config/mozconfigs/linux64/main"
 
 TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
 
 ac_add_options --disable-install-strip
 ac_add_options --disable-jemalloc
 ac_add_options --disable-crashreporter
 ac_add_options --disable-elf-hack
 ac_add_options --enable-debug
rename from browser/config/mozconfigs/linux64/nightly
rename to browser/config/mozconfigs/linux64/main
--- a/browser/config/mozconfigs/linux64/nightly
+++ b/browser/config/mozconfigs/linux64/main
@@ -1,14 +1,39 @@
+# This is the main mozconfig for "normal"/shipped builds. It is used
+# by all channels and release configurations.
+
+if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
+  MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
+  MOZ_AUTOMATION_UPDATE_PACKAGING=1
+fi
+
 . "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
 
-ac_add_options --enable-profiling
 ac_add_options --enable-verify-mar
 
-# This will overwrite the default of stripping everything and keep the symbol table.
-# This is useful for profiling and debugging and only increases the package size
-# by 2 MBs.
-STRIP_FLAGS="--strip-debug"
+if [ "${MOZ_BUILD_CHANNEL}" = "nightly" ]; then
+  ac_add_options --enable-profiling
+
+  # This will overwrite the default of stripping everything and keep the symbol table.
+  # This is useful for profiling and debugging and only increases the package size
+  # by 2 MBs.
+  STRIP_FLAGS="--strip-debug"
 
-ac_add_options --with-branding=browser/branding/nightly
+  ac_add_options --with-branding=browser/branding/nightly
+else
+  ac_add_options --enable-official-branding
+  mk_add_options MOZ_PGO=1
+fi
+
+if [ "${MOZ_BUILD_CHANNEL}" = "release" ]; then
+  # safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
+  # defines.sh during the beta cycle
+  export BUILDING_RELEASE=1
+fi
 
 . "$topsrcdir/build/mozconfig.common.override"
-. "$topsrcdir/build/mozconfig.cache"
+
+# Don't enable caching for release build configurations.
+if [ "${MOZ_BUILD_CHANNEL}" = "nightly" ]; then
+  . "$topsrcdir/build/mozconfig.cache"
+fi
+
--- a/browser/config/mozconfigs/linux64/opt-dmd
+++ b/browser/config/mozconfigs/linux64/opt-dmd
@@ -1,3 +1,3 @@
 ac_add_options --enable-dmd
 
-. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+. "$topsrcdir/browser/config/mozconfigs/linux64/main"
deleted file mode 100644
--- a/browser/config/mozconfigs/linux64/release
+++ /dev/null
@@ -1,20 +0,0 @@
-# This make file should be identical to the beta mozconfig, apart from the
-# safeguard below
-
-if [ -n "$ENABLE_RELEASE_PROMOTION" ]; then
-  MOZ_AUTOMATION_UPLOAD_SYMBOLS=${MOZ_AUTOMATION_UPLOAD_SYMBOLS-1}
-  MOZ_AUTOMATION_UPDATE_PACKAGING=1
-fi
-
-. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
-
-ac_add_options --enable-official-branding
-ac_add_options --enable-verify-mar
-
-mk_add_options MOZ_PGO=1
-
-# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
-# defines.sh during the beta cycle
-export BUILDING_RELEASE=1
-
-. "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/linux64/stylo
+++ b/browser/config/mozconfigs/linux64/stylo
@@ -1,3 +1,3 @@
-. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+. "$topsrcdir/browser/config/mozconfigs/linux64/main"
 
 ac_add_options --enable-stylo
--- a/browser/config/mozconfigs/linux64/valgrind
+++ b/browser/config/mozconfigs/linux64/valgrind
@@ -1,9 +1,9 @@
-. $topsrcdir/browser/config/mozconfigs/linux64/nightly
+. $topsrcdir/browser/config/mozconfigs/linux64/main
 
 ac_add_options --enable-valgrind
 ac_add_options --disable-jemalloc
 ac_add_options --disable-install-strip
 ac_add_options --disable-gtest-in-build
 
 # Rust code gives false positives that we have not entirely suppressed yet.
 # Bug 1365915 tracks fixing these.
--- a/testing/mozharness/configs/builds/branch_specifics.py
+++ b/testing/mozharness/configs/builds/branch_specifics.py
@@ -51,17 +51,16 @@ config = {
         'branch_uses_per_checkin_strategy': True,
         'stage_server': 'upload.ffxbld.productdelivery.prod.mozaws.net',
         'platform_overrides': {
             'linux': {
                 'src_mozconfig': 'browser/config/mozconfigs/linux32/release',
                 'force_clobber': True,
             },
             'linux64': {
-                'src_mozconfig': 'browser/config/mozconfigs/linux64/release',
                 'force_clobber': True,
             },
             'macosx64': {
                 'src_mozconfig': 'browser/config/mozconfigs/macosx64/release',
                 'force_clobber': True,
             },
             'win32': {
                 'src_mozconfig': 'browser/config/mozconfigs/win32/release',
@@ -125,17 +124,16 @@ config = {
         'branch_uses_per_checkin_strategy': True,
         'stage_server': 'upload.ffxbld.productdelivery.prod.mozaws.net',
         'platform_overrides': {
             'linux': {
                 'src_mozconfig': 'browser/config/mozconfigs/linux32/beta',
                 'force_clobber': True,
             },
             'linux64': {
-                'src_mozconfig': 'browser/config/mozconfigs/linux64/beta',
                 'force_clobber': True,
             },
             'macosx64': {
                 'src_mozconfig': 'browser/config/mozconfigs/macosx64/beta',
                 'force_clobber': True,
             },
             'win32': {
                 'src_mozconfig': 'browser/config/mozconfigs/win32/beta',
@@ -291,19 +289,16 @@ config = {
         'enable_release_promotion': 1,
         'platform_overrides': {
             'linux': {
                 'src_mozconfig': 'browser/config/mozconfigs/linux32/release',
             },
             'linux-debug': {
                 'update_channel': 'default',
             },
-            'linux64': {
-                'src_mozconfig': 'browser/config/mozconfigs/linux64/release',
-            },
             'linux64-debug': {
                 'update_channel': 'default',
             },
             'linux64-asan-debug': {
                 'update_channel': 'default',
             },
             'linux64-asan': {
                 'update_channel': 'default',
--- a/testing/mozharness/configs/builds/releng_base_linux_64_builds.py
+++ b/testing/mozharness/configs/builds/releng_base_linux_64_builds.py
@@ -124,11 +124,11 @@ config = {
         ### from releng repo
         'gcc45_0moz3', 'gcc454_0moz1', 'gcc472_0moz1', 'gcc473_0moz1',
         'yasm', 'ccache',
         ###
         'pulseaudio-libs-devel', 'gstreamer-devel',
         'gstreamer-plugins-base-devel', 'freetype-2.3.11-6.el6_1.8.x86_64',
         'freetype-devel-2.3.11-6.el6_1.8.x86_64'
     ],
-    'src_mozconfig': 'browser/config/mozconfigs/linux64/nightly',
+    'src_mozconfig': 'browser/config/mozconfigs/linux64/main',
     #########################################################################
 }
--- a/testing/mozharness/configs/merge_day/central_to_beta.py
+++ b/testing/mozharness/configs/merge_day/central_to_beta.py
@@ -36,17 +36,16 @@ config = {
                   "mobile/android/config/mozconfigs/android-aarch64/l10n-nightly"]
     ] + [
         # File, from, to
         (f, "ac_add_options --enable-profiling", "") for f in
         ["mobile/android/config/mozconfigs/android-api-15/nightly",
          "mobile/android/config/mozconfigs/android-x86/nightly",
          "mobile/android/config/mozconfigs/android-aarch64/nightly",
          "browser/config/mozconfigs/linux32/nightly",
-         "browser/config/mozconfigs/linux64/nightly",
          "browser/config/mozconfigs/macosx64/nightly",
          "browser/config/mozconfigs/win32/nightly",
          "browser/config/mozconfigs/win64/nightly"]
     ] + [
         # File, from, to
         ("browser/confvars.sh",
          "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-central",
          "ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-beta,firefox-mozilla-release"),