Bug 1115426 - Fix static-analysis builds on OSX on the infrasturcture, and add a mozconfig for such builds; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 24 Dec 2014 17:14:31 -0500
changeset 248079 5cdd3215addcaa241b48961a1170146235ef6bf7
parent 248078 655ef5ce203202bf4dd3c75d5f467684a1ee0e22
child 248080 8cde6c13407c1e62c84ec031b98c7b91804c8e06
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1115426
milestone37.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 1115426 - Fix static-analysis builds on OSX on the infrasturcture, and add a mozconfig for such builds; r=glandium This also cleans up some of the existing mozconfig files.
browser/config/mozconfigs/linux64/debug-static-analysis-clang
browser/config/mozconfigs/macosx64/debug
browser/config/mozconfigs/macosx64/debug-asan
browser/config/mozconfigs/macosx64/debug-static-analysis
build/autoconf/clang-plugin.m4
--- a/browser/config/mozconfigs/linux64/debug-static-analysis-clang
+++ b/browser/config/mozconfigs/linux64/debug-static-analysis-clang
@@ -1,20 +1,19 @@
 MOZ_AUTOMATION_BUILD_SYMBOLS=0
 MOZ_AUTOMATION_PACKAGE_TESTS=0
 MOZ_AUTOMATION_L10N_CHECK=0
 
 . "$topsrcdir/build/mozconfig.common"
 
 ac_add_options --enable-debug
+ac_add_options --enable-dmd
 
 ac_add_options --disable-unified-compilation
 
-ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
-
 # 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
 
 # Avoid dependency on libstdc++ 4.7
--- a/browser/config/mozconfigs/macosx64/debug
+++ b/browser/config/mozconfigs/macosx64/debug
@@ -1,13 +1,12 @@
 . $topsrcdir/build/macosx/mozconfig.common
 
 ac_add_options --enable-debug
 ac_add_options --enable-dmd
-ac_add_options --enable-accessibility
 ac_add_options --enable-signmar
 ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
 
 # Needed to enable breakpad in application.ini
 export MOZILLA_OFFICIAL=1
 
 if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
 ac_add_options --with-macbundlename-prefix=Firefox
--- a/browser/config/mozconfigs/macosx64/debug-asan
+++ b/browser/config/mozconfigs/macosx64/debug-asan
@@ -1,14 +1,13 @@
 . $topsrcdir/build/unix/mozconfig.asan
 
 ac_add_options --enable-application=browser
 ac_add_options --enable-debug
 ac_add_options --enable-optimize="-O1"
-ac_add_options --enable-accessibility
 ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
 
 ac_add_options --disable-unified-compilation
 
 # Package js shell.
 export MOZ_PACKAGE_JSSHELL=1
 
 if test "${MOZ_UPDATE_CHANNEL}" = "nightly"; then
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/macosx64/debug-static-analysis
@@ -0,0 +1,15 @@
+MOZ_AUTOMATION_BUILD_SYMBOLS=0
+MOZ_AUTOMATION_PACKAGE_TESTS=0
+MOZ_AUTOMATION_L10N_CHECK=0
+
+. $topsrcdir/build/macosx/mozconfig.common
+
+ac_add_options --enable-debug
+ac_add_options --enable-dmd
+
+# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
+ac_add_options --enable-warnings-as-errors
+
+ac_add_options --enable-clang-plugin
+
+. "$topsrcdir/build/mozconfig.common.override"
--- a/build/autoconf/clang-plugin.m4
+++ b/build/autoconf/clang-plugin.m4
@@ -28,17 +28,21 @@ if test -n "$ENABLE_CLANG_PLUGIN"; then
     fi
 
     AC_MSG_RESULT([$LLVMCONFIG])
 
     if test -z "$LLVMCONFIG"; then
         AC_MSG_ERROR([Cannot find an llvm-config binary for building a clang plugin])
     fi
     LLVM_CXXFLAGS=`$LLVMCONFIG --cxxflags`
-    LLVM_LDFLAGS=`$LLVMCONFIG --ldflags --system-libs --libs core mc analysis asmparser mcparser bitreader option | xargs`
+    dnl The clang package we use on OSX is old, and its llvm-config doesn't
+    dnl recognize --system-libs, so ask for that separately.  llvm-config's
+    dnl failure here is benign, so we can ignore it if it happens.
+    LLVM_LDFLAGS=`$LLVMCONFIG --system-libs | xargs`
+    LLVM_LDFLAGS="$LLVM_LDFLAGS `$LLVMCONFIG --ldflags --libs core mc analysis asmparser mcparser bitreader option | xargs`"
 
     if test "${OS_ARCH}" = "Darwin"; then
         CLANG_LDFLAGS="-lclangFrontend -lclangDriver -lclangSerialization"
         CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangParse -lclangSema -lclangAnalysis"
         CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangEdit -lclangAST -lclangLex"
         CLANG_LDFLAGS="$CLANG_LDFLAGS -lclangBasic -lclangASTMatchers"
     else
         CLANG_LDFLAGS="-lclangASTMatchers"