Bug 1280338 - Use tooltool GCC's ld on TSan builds. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 16 Jun 2016 03:49:45 +0900
changeset 327017 8359dc68212e4f06c300272a19aea77a106fd777
parent 327016 4e16558233f985125db446de2b3fee7055b2b623
child 327018 d4a5c8fbfc20cebcae60d1e073874d19fa47d831
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1280338, 1278718
milestone50.0a1
Bug 1280338 - Use tooltool GCC's ld on TSan builds. r=froydnj Something similar was done in bug 1278718 for ASan builds, because of indirect dependencies on libstdc++ being picked by the linker and leading to linkage failure with the older binutils from the CentOS 6 image we use to do desktop builds.
browser/config/tooltool-manifests/linux64/tsan.manifest
build/unix/mozconfig.tsan
--- a/browser/config/tooltool-manifests/linux64/tsan.manifest
+++ b/browser/config/tooltool-manifests/linux64/tsan.manifest
@@ -1,10 +1,18 @@
 [
 {
+"version": "gcc 4.8.5 + PR64905",
+"size": 80160264,
+"digest": "c1a9dc9da289b8528874d16300b9d13a997cec99195bb0bc46ff665216d8535d6d6cb5af6b4b1f2749af6815dab12e703fdb3849014e5c23a70eff351a0baf4e",
+"algorithm": "sha512",
+"filename": "gcc.tar.xz",
+"unpack": true
+},
+{
 "version": "clang 3.6.2/r241773",
 "size": 89690541, 
 "digest": "470d258d9785a120fcba65eee90daa632a42affa0f97f57d70fc8285bd76bcc27d4d0d70b6c37577ab271a04c843b6269425391a8d6df1967718dba26dd3a73d", 
 "algorithm": "sha512", 
 "filename": "clang.tar.bz2",
 "unpack": true
 },
 {
--- a/build/unix/mozconfig.tsan
+++ b/build/unix/mozconfig.tsan
@@ -7,16 +7,22 @@ export CC="$topsrcdir/clang/bin/clang"
 export CXX="$topsrcdir/clang/bin/clang++"
 export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
 
 # Mandatory flag for TSan
 export CFLAGS="-fsanitize=thread"
 export CXXFLAGS="-fsanitize=thread"
 export LDFLAGS="-fsanitize=thread"
 
+# Use a newer binutils, from the tooltool gcc package, if it's there
+if [ -e "$topsrcdir/gcc/bin/ld" ]; then
+    export CC="$CC -B $topsrcdir/gcc/bin"
+    export CXX="$CXX -B $topsrcdir/gcc/bin"
+fi
+
 # Enable TSan specific code and build workarounds
 ac_add_options --enable-thread-sanitizer
 
 # The ThreadSanitizer is not compatible with sanboxing
 # (see bug 1182565)
 ac_add_options --disable-sandbox
 
 # These are required by TSan