Bug 1382525 - Move LLVM_CONFIG out of mozconfig.common. r?chmanchester
LLVM_CONFIG, per the contents of toolkit/moz.configure, is tied to
--enable-stylo, but it currently is set on all types of builds. It
currently happens to work, but it's actually not meant to, and sure
enough, the fix for
bug 1374727 exacerbates that.
So we create a new mozconfig.stylo file that enables stylo and sets
LLVM_CONFIG, such that only build types that do enable stylo have
LLVM_CONFIG set.
--- a/browser/config/mozconfigs/linux64/common-opt
+++ b/browser/config/mozconfigs/linux64/common-opt
@@ -1,13 +1,11 @@
# This file is sourced by the nightly, beta, and release mozconfigs.
-# TODO remove once configure defaults to stylo once stylo enabled
-# on all platforms.
-ac_add_options --enable-stylo=build
+. $topsrcdir/build/mozconfig.stylo
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --with-google-api-keyfile=/builds/gapi.data
ac_add_options --with-mozilla-api-keyfile=/builds/mozilla-desktop-geoloc-api.key
. $topsrcdir/build/unix/mozconfig.linux
# Needed to enable breakpad in application.ini
--- a/browser/config/mozconfigs/linux64/debug
+++ b/browser/config/mozconfigs/linux64/debug
@@ -1,14 +1,13 @@
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-verify-mar
-# TODO remove once configure defaults to stylo once stylo enabled
-ac_add_options --enable-stylo=build
+. $topsrcdir/build/mozconfig.stylo
MOZ_AUTOMATION_L10N_CHECK=0
. $topsrcdir/build/unix/mozconfig.linux
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
--- a/browser/config/mozconfigs/linux64/debug-static-analysis-clang
+++ b/browser/config/mozconfigs/linux64/debug-static-analysis-clang
@@ -4,16 +4,17 @@ MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/build/mozconfig.common"
ac_add_options --enable-debug
ac_add_options --enable-dmd
# Disable stylo until bug 1356926 is fixed and we have >= llvm39 on centos.
ac_add_options --disable-stylo
+unset LLVM_CONFIG
# Use Clang as specified in manifest
export CC="$topsrcdir/clang/bin/clang"
export CXX="$topsrcdir/clang/bin/clang++"
# Add the static checker
ac_add_options --enable-clang-plugin
--- a/browser/config/mozconfigs/linux64/opt-static-analysis-clang
+++ b/browser/config/mozconfigs/linux64/opt-static-analysis-clang
@@ -3,16 +3,17 @@ MOZ_AUTOMATION_PACKAGE_TESTS=0
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/build/mozconfig.common"
ac_add_options --enable-dmd
# Disable stylo until bug 1356926 is fixed and we have >= llvm39 on centos.
ac_add_options --disable-stylo
+unset LLVM_CONFIG
# Use Clang as specified in manifest
CC="$topsrcdir/clang/bin/clang"
CXX="$topsrcdir/clang/bin/clang++"
# Add the static checker
ac_add_options --enable-clang-plugin
--- a/browser/config/mozconfigs/linux64/valgrind
+++ b/browser/config/mozconfigs/linux64/valgrind
@@ -3,12 +3,13 @@
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.
ac_add_options --disable-stylo
+unset LLVM_CONFIG
# Include the override mozconfig again (even though the above includes it)
# since it's supposed to override everything.
. "$topsrcdir/build/mozconfig.common.override"
--- a/browser/config/mozconfigs/win32/common-opt
+++ b/browser/config/mozconfigs/win32/common-opt
@@ -1,13 +1,11 @@
# This file is sourced by the nightly, beta, and release mozconfigs.
-# TODO remove once configure defaults to stylo once stylo enabled
-# on all platforms.
-ac_add_options --enable-stylo=build
+. "$topsrcdir/build/mozconfig.stylo"
. "$topsrcdir/browser/config/mozconfigs/common"
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --enable-jemalloc
if [ -f /c/builds/gapi.data ]; then
_gapi_keyfile=c:/builds/gapi.data
--- a/browser/config/mozconfigs/win32/debug
+++ b/browser/config/mozconfigs/win32/debug
@@ -1,15 +1,13 @@
. "$topsrcdir/build/mozconfig.win-common"
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/browser/config/mozconfigs/common"
-# TODO remove once configure defaults to stylo once stylo enabled
-# on all platforms.
-ac_add_options --enable-stylo=build
+. "$topsrcdir/build/mozconfig.stylo"
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-profiling # needed for --enable-dmd to work on Windows
ac_add_options --enable-verify-mar
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
--- a/browser/config/mozconfigs/win64/common-opt
+++ b/browser/config/mozconfigs/win64/common-opt
@@ -1,13 +1,11 @@
# This file is sourced by the nightly, beta, and release mozconfigs.
-# TODO remove once configure defaults to stylo once stylo enabled
-# on all platforms.
-ac_add_options --enable-stylo=build
+. "$topsrcdir/build/mozconfig.stylo"
. "$topsrcdir/browser/config/mozconfigs/common"
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
ac_add_options --enable-jemalloc
if [ -f /c/builds/gapi.data ]; then
_gapi_keyfile=c:/builds/gapi.data
else
--- a/browser/config/mozconfigs/win64/debug
+++ b/browser/config/mozconfigs/win64/debug
@@ -1,18 +1,16 @@
. "$topsrcdir/build/mozconfig.win-common"
MOZ_AUTOMATION_L10N_CHECK=0
. "$topsrcdir/browser/config/mozconfigs/common"
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
-# TODO remove once configure defaults to stylo once stylo enabled
-# on all platforms.
-ac_add_options --enable-stylo=build
+. "$topsrcdir/build/mozconfig.stylo"
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-profiling # needed for --enable-dmd to work on Windows
ac_add_options --enable-verify-mar
# Needed to enable breakpad in application.ini
export MOZILLA_OFFICIAL=1
--- a/build/macosx/mozconfig.common
+++ b/build/macosx/mozconfig.common
@@ -1,9 +1,7 @@
if test `uname -s` = Linux; then
. $topsrcdir/build/macosx/cross-mozconfig.common
else
. $topsrcdir/build/macosx/local-mozconfig.common
fi
-# Enable stylo in automation builds.
-# Can be removed after bug 1375774 is resolved.
-ac_add_options --enable-stylo=build
+. $topsrcdir/build/mozconfig.stylo
--- a/build/mozconfig.common
+++ b/build/mozconfig.common
@@ -9,19 +9,16 @@
# architectures, though note that if you want to override options set in
# another mozconfig file, you'll need to use mozconfig.common.override instead
# of this file.
mk_add_options AUTOCLOBBER=1
ac_add_options --enable-crashreporter
-# Tell the build system where to find llvm-config for builds on automation.
-export LLVM_CONFIG="${TOOLTOOL_DIR:-$topsrcdir}/clang/bin/llvm-config"
-
# Enable checking that add-ons are signed by the trusted root
MOZ_ADDON_SIGNING=${MOZ_ADDON_SIGNING-1}
# Disable enforcing that add-ons are signed by the trusted root
MOZ_REQUIRE_SIGNING=${MOZ_REQUIRE_SIGNING-0}
ac_add_options --enable-js-shell
. "$topsrcdir/build/mozconfig.automation"
--- a/build/mozconfig.no-compile
+++ b/build/mozconfig.no-compile
@@ -5,8 +5,9 @@ unset CC
unset CXX
unset HOST_CC
unset HOST_CXX
unset RUSTC
unset CARGO
unset MAKECAB
unset TOOLCHAIN_PREFIX
unset BINDGEN_CFLAGS
+unset LLVM_CONFIG
new file mode 100644
--- /dev/null
+++ b/build/mozconfig.stylo
@@ -0,0 +1,6 @@
+# Tell the build system where to find llvm-config for builds on automation.
+export LLVM_CONFIG="${TOOLTOOL_DIR:-$topsrcdir}/clang/bin/llvm-config"
+
+# TODO remove once configure defaults to stylo once stylo enabled
+# on all platforms.
+ac_add_options --enable-stylo=build