build/unix/mozconfig.lto
author Mike Hommey <mh+mozilla@glandium.org>
Thu, 23 Aug 2018 18:00:29 +0900
changeset 433250 7d4ae67397e207d28f6fa51cadef94a14d482d85
parent 429920 a973e7f82da4d0132e89a0ffaa22859e2c070f6c
child 434010 6fd2ee9bacf2869ba06830ea0e15da28ef2dea75
permissions -rw-r--r--
Bug 1485610 - Avoid copy relocations in binaries we build. r=froydnj See bug 1485562 for an example of bad things that can happen with such relocations, and see also https://github.com/llvm-mirror/lld/blob/c90379ddfe5eefdcb8edcaca5fa90a831505ae18/ELF/Relocations.cpp#L496-L537

MOZ_AUTOMATION_L10N_CHECK=0

. "$topsrcdir/build/mozconfig.common"

# Use Clang as specified in manifest
export AR="$topsrcdir/clang/bin/llvm-ar"
export NM="$topsrcdir/clang/bin/llvm-nm"
export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"

export CC="$topsrcdir/clang/bin/clang"
export CXX="$topsrcdir/clang/bin/clang++"

# 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

ac_add_options --enable-lto
# Until it's either made the default or we figure a way to remove the
# copy locations that LTO induces in non-PIE executables.
ac_add_options --enable-pie

. "$topsrcdir/build/unix/mozconfig.stdcxx"