Bug 1302891 - Part 0 - Required user changes to enable CFI; r?glandium
MozReview-Commit-ID: Cek67oXwZF1
--- a/browser/config/tooltool-manifests/linux64/releng.manifest
+++ b/browser/config/tooltool-manifests/linux64/releng.manifest
@@ -3,16 +3,32 @@
"version": "gcc 4.8.5 + PR64905",
"size": 80160264,
"digest": "c1a9dc9da289b8528874d16300b9d13a997cec99195bb0bc46ff665216d8535d6d6cb5af6b4b1f2749af6815dab12e703fdb3849014e5c23a70eff351a0baf4e",
"algorithm": "sha512",
"filename": "gcc.tar.xz",
"unpack": true
},
{
+"version": "clang with vtable whitelist patch",
+"size": 146437724,
+"digest": "9b1e0778597059e94275d94d71b2b682139a2f50e1c653ac705aa046ee93f9bdb3ab00babe5f457595a43b8113e9fc639854dfbd6b15d1d0e73f3e3f81fe5d69",
+"algorithm": "sha512",
+"filename": "clang.tar.xz",
+"unpack": true
+},
+{
+"version": "binutils with ld.gold",
+"size": 27710776,
+"digest": "3ab85f17cbb26a0d91eb55c6724323de32df298caecec40559b1d7cf275344a42b8ba6d6dd9cfdfde4307dcb2af07a82dae88aa0b00590efaf6c09cf457d4a24",
+"algorithm": "sha512",
+"filename": "binutils.tar.xz",
+"unpack": true
+},
+{
"size": 12072532,
"digest": "3915f8ec396c56a8a92e6f9695b70f09ce9d1582359d1258e37e3fd43a143bc974410e4cfc27f500e095f34a8956206e0ebf799b7287f0f38def0d5e34ed71c9",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
},
{
--- a/build/mozconfig.common.override
+++ b/build/mozconfig.common.override
@@ -4,8 +4,30 @@
# Common mozconfig for all users
#
# Add options to this file that will be inherited by all in-tree mozconfigs.
# This file is included at the *end* of the mozconfigs, and so may be used
# to override anything done previously.
#
# The common expected usage is for try builds with nondefault options.
+
+ac_add_options --enable-cfi
+
+# -Os does not work with -flto IIRC, we have to set our optimization level
+ac_add_options --enable-optimize="-O2"
+
+# clang path: we are using the clang compiler
+# binutils path: if ld is ld.bfd, configuration must set ld.gold as ld
+mk_add_options PATH="$TOOLTOOL_DIR/binutils/bin:$TOOLTOOL_DIR/clang/bin:$PATH"
+
+export CC="clang"
+export CXX="clang++"
+export AR="llvm-ar"
+export RANLIB="llvm-ranlib"
+export NM="llvm-nm"
+
+# compiler flags
+mk_add_options "export CFI_WHITELIST=$topsrcdir/cfi-whitelist.txt"
+#mk_add_options "export CFI_DSO_DISABLE_CRASH=1"
+
+# dont use sccache: sccache on buildbot is using old cfi-whitelist.txt ..
+NO_CACHE=1