Bug 1477306 - Point -fcrash-diagnostics-dir at UPLOAD_DIR when compiling with clang in automation r=firefox-build-system-reviewers,chmanchester
authorDavid Major <dmajor@mozilla.com>
Tue, 22 Jan 2019 19:27:13 +0000
changeset 454907 31a754e0302db5d22a3485f1aef60a762d5507e1
parent 454906 09e1109d23504fbc57c80a8982f88f8d710338bd
child 454908 a57c4b40b14f246d0f76bfbd9e6124c9433d8fec
push id35419
push userdluca@mozilla.com
push dateWed, 23 Jan 2019 16:31:25 +0000
treeherdermozilla-central@2e27f3f1ebc6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, chmanchester
bugs1477306
milestone66.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 1477306 - Point -fcrash-diagnostics-dir at UPLOAD_DIR when compiling with clang in automation r=firefox-build-system-reviewers,chmanchester Differential Revision: https://phabricator.services.mozilla.com/D16765
build/macosx/cross-mozconfig.common
build/mozconfig.clang-cl
build/unix/mozconfig.unix
--- a/build/macosx/cross-mozconfig.common
+++ b/build/macosx/cross-mozconfig.common
@@ -18,16 +18,18 @@ mk_add_options "export LD_LIBRARY_PATH=$
 #   tar -C $(dirname ${sdk_path}) -cHjf /tmp/$(basename ${sdk_path}).tar.bz2 $(basename ${sdk_path})
 # Upload the resulting tarball from /tmp to tooltool, and change the entry in
 # `browser/config/tooltool-manifests/macosx64/cross-releng.manifest`.
 CROSS_SYSROOT=$topsrcdir/MacOSX10.11.sdk
 CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
 
 export CC="$topsrcdir/clang/bin/clang"
 export CXX="$topsrcdir/clang/bin/clang++"
+export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
+export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
 export LLVMCONFIG=$topsrcdir/clang/bin/llvm-config
 export BINDGEN_CFLAGS="-isysroot $CROSS_SYSROOT"
 export DSYMUTIL=$topsrcdir/build/macosx/llvm-dsymutil
 mk_add_options "export REAL_DSYMUTIL=$topsrcdir/llvm-dsymutil/bin/dsymutil"
 export MKFSHFS=$topsrcdir/hfsplus-tools/newfs_hfs
 export DMG_TOOL=$topsrcdir/dmg/dmg
 export HFS_TOOL=$topsrcdir/dmg/hfsplus
 
--- a/build/mozconfig.clang-cl
+++ b/build/mozconfig.clang-cl
@@ -8,8 +8,14 @@ if test -d "$topsrcdir/clang/bin"; then
         export LIB=$LIB:$CLANG_LIB_DIR
         mk_export_correct_style LIB
     fi
 fi
 
 export CC=clang-cl
 export CXX=clang-cl
 export ENABLE_CLANG_PLUGIN=1
+
+if [ -n "$UPLOAD_PATH" ]; then
+    DIAGNOSTICS_DIR="$(cmd.exe //e:on //c if not exist ${UPLOAD_PATH} mkdir ${UPLOAD_PATH} && cd ${UPLOAD_PATH} && pwd)"
+    export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${DIAGNOSTICS_DIR}"
+    export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${DIAGNOSTICS_DIR}"
+fi
--- a/build/unix/mozconfig.unix
+++ b/build/unix/mozconfig.unix
@@ -8,16 +8,18 @@ if [ -n "$FORCE_GCC" ]; then
 
     # We want to make sure we use binutils and other binaries in the tooltool
     # package.
     mk_add_options "export PATH=$TOOLTOOL_DIR/gcc/bin:$PATH"
 else
     CC="$TOOLTOOL_DIR/clang/bin/clang"
     CXX="$TOOLTOOL_DIR/clang/bin/clang++"
     export ENABLE_CLANG_PLUGIN=1
+    export CFLAGS="$CFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
+    export CXXFLAGS="$CXXFLAGS -fcrash-diagnostics-dir=${UPLOAD_PATH}"
 
     if [ -n "$MOZ_PGO" ]; then
         if [ -z "$USE_ARTIFACT" ]; then
             ac_add_options --enable-lto
         fi
         export LLVM_PROFDATA="$TOOLTOOL_DIR/clang/bin/llvm-profdata"
         export AR="$topsrcdir/clang/bin/llvm-ar"
         export NM="$topsrcdir/clang/bin/llvm-nm"