Bug 1534159 - remove exceptions for Android and Darwin from libstdcxx checks; r=glandium
authorNathan Froyd <froydnj@mozilla.com>
Wed, 13 Mar 2019 22:24:20 +0000
changeset 521809 9d0023caa09b98eb8ca160dd2dda6c0b7baa9ea2
parent 521808 5849b867ecf7c485b71ca694167f5a63b2d6c6ca
child 521810 e913585fdb4bdd73946b5e357c78da7221a71a53
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1534159
milestone67.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 1534159 - remove exceptions for Android and Darwin from libstdcxx checks; r=glandium The only place we'd need the compat libraries would be for host binaries, and those shouldn't be a problem given that our system images are new enough. Differential Revision: https://phabricator.services.mozilla.com/D22873
build/macosx/cross-mozconfig.common
build/moz.configure/toolchain.configure
mobile/android/config/mozconfigs/common
--- a/build/macosx/cross-mozconfig.common
+++ b/build/macosx/cross-mozconfig.common
@@ -42,8 +42,10 @@ export MACOS_SDK_DIR=$CROSS_SYSROOT
 export MACOS_PRIVATE_FRAMEWORKS_DIR=$CROSS_PRIVATE_FRAMEWORKS
 
 if [ "x$MOZ_PKG_SPECIAL" != "xasan" -a -z "$MOZ_AUTOMATION_ARTIFACT_BUILDS" ]; then
   # Enable static analysis checks by default on OSX cross builds.
   # Exception is ASan, where this breaks.
   # The option is not valid on artifact builds, so don't add it there either.
   ac_add_options --enable-clang-plugin
 fi
+
+unset MOZ_STDCXX_COMPAT
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -2169,24 +2169,22 @@ add_old_configure_assignment('ENABLE_MOZ
 # Libstdc++ compatibility hacks
 # ==============================================================
 #
 js_option('--enable-stdcxx-compat', env='MOZ_STDCXX_COMPAT',
           help='Enable compatibility with older libstdc++')
 
 
 @template
-def libstdcxx_version(var, compiler, host_or_target):
-    @depends(compiler, host_or_target, when='--enable-stdcxx-compat')
+def libstdcxx_version(var, compiler):
+    @depends(compiler, when='--enable-stdcxx-compat')
     @checking(var, lambda v: v and "GLIBCXX_%s" % v.dotted)
     @imports(_from='mozbuild.configure.libstdcxx', _import='find_version')
     @imports(_from='__builtin__', _import='Exception')
-    def version(compiler, host_or_target):
-        if host_or_target.os == 'Android' or host_or_target.kernel == 'Darwin':
-            return None
+    def version(compiler):
         try:
             result = find_version(
                 compiler.wrapper + [compiler.compiler] + compiler.flags)
         except Exception:
             die("Couldn't determine libstdc++ version")
         if result:
             return namespace(
                 dotted=result[0],
@@ -2195,21 +2193,21 @@ def libstdcxx_version(var, compiler, hos
 
     set_config(var, version.encoded)
     return version
 
 
 add_gcc_flag(
     '-D_GLIBCXX_USE_CXX11_ABI=0', cxx_compiler,
     when=libstdcxx_version(
-        'MOZ_LIBSTDCXX_TARGET_VERSION', cxx_compiler, target))
+        'MOZ_LIBSTDCXX_TARGET_VERSION', cxx_compiler))
 add_gcc_flag(
     '-D_GLIBCXX_USE_CXX11_ABI=0', host_cxx_compiler,
     when=libstdcxx_version(
-        'MOZ_LIBSTDCXX_HOST_VERSION', host_cxx_compiler, host))
+        'MOZ_LIBSTDCXX_HOST_VERSION', host_cxx_compiler))
 
 
 @depends(c_compiler.try_compile(flags=['-fsanitize=fuzzer-no-link'],
          check_msg='whether the C compiler supports -fsanitize=fuzzer-no-link'))
 def libfuzzer_flags(value):
     if value:
         no_link_flag_supported = True
         # recommended for (and only supported by) clang >= 6
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -89,11 +89,9 @@ elif test "$MOZ_UPDATE_CHANNEL" = "night
     ac_add_options --with-pocket-api-keyfile=/builds/pocket-api-nightly.token
 else
     ac_add_options --with-pocket-api-keyfile="$topsrcdir/mobile/android/base/pocket-api-sandbox.token"
 fi
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
-. "$topsrcdir/build/unix/mozconfig.stdcxx"
-
 JS_BINARY="$topsrcdir/mobile/android/config/js_wrapper.sh"