Bug 1357317 - Add an rpath to cctools such that it doesn't require LD_LIBRARY_PATH at run-time. r=nalexander

Differential Revision: https://phabricator.services.mozilla.com/D38140

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2019-07-16 20:54:42 +00:00
Родитель a4493b9ba3
Коммит 79919f31ad
6 изменённых файлов: 2 добавлений и 10 удалений

Просмотреть файл

@ -9,7 +9,7 @@ MOZ_AUTOMATION_L10N_CHECK=0
# cctools for ld, ar, and other related tools ; dsymutil for rust.
mk_add_options "export PATH=$topsrcdir/cctools/bin:$topsrcdir/binutils/bin:$topsrcdir/llvm-dsymutil/bin:$PATH"
# ld needs libLTO.so from llvm
# dsymutil needs a libstdc++ more recent than what's on the system.
mk_add_options "export LD_LIBRARY_PATH=$topsrcdir/clang/lib"
# This SDK was copied from a local XCode install and uploaded to tooltool.

Просмотреть файл

@ -52,7 +52,6 @@ export PATH="$WORKSPACE/build/src/binutils/bin:$PATH"
# Common setup for libtapi and cctools
export CC=$CLANG_DIR/bin/clang
export CXX=$CLANG_DIR/bin/clang++
# TODO: bug 1357317 to avoid the LD_LIBRARY_PATH.
# We also need this LD_LIBRARY_PATH at build time, since tapi builds bits of
# clang build tools, and then executes those tools.
export LD_LIBRARY_PATH=$CLANG_DIR/lib
@ -84,7 +83,7 @@ ninja libtapi install-libtapi install-tapi-headers
# Also set it up such that loading libtapi doesn't require a LD_LIBRARY_PATH.
# (this requires two dollars and extra backslashing because it's used verbatim
# via a Makefile)
export LDFLAGS="-lpthread -Wl,-rpath-link,$CLANG_DIR/lib -Wl,-rpath,\\\$\$ORIGIN/../lib"
export LDFLAGS="-lpthread -Wl,-rpath-link,$CLANG_DIR/lib -Wl,-rpath,\\\$\$ORIGIN/../lib,-rpath,\\\$\$ORIGIN/../../clang/lib"
# Configure crosstools-port
cd $CROSSTOOLS_CCTOOLS_DIR

Просмотреть файл

@ -11,8 +11,6 @@ cd $HOME_DIR/src
. taskcluster/scripts/misc/tooltool-download.sh
# ld needs libLTO.so from llvm
export LD_LIBRARY_PATH=$HOME_DIR/src/clang/lib
# these variables are used in build-clang.py
export CROSS_CCTOOLS_PATH=$HOME_DIR/src/cctools
export CROSS_SYSROOT=$HOME_DIR/src/MacOSX10.11.sdk

Просмотреть файл

@ -10,8 +10,6 @@ cd $HOME_DIR/src
. taskcluster/scripts/misc/tooltool-download.sh
# ld needs libLTO.so from llvm
export LD_LIBRARY_PATH=$HOME_DIR/src/clang/lib
# these variables are used in build-clang.py
export CROSS_CCTOOLS_PATH=$HOME_DIR/src/cctools
export CROSS_SYSROOT=$HOME_DIR/src/MacOSX10.11.sdk

Просмотреть файл

@ -10,8 +10,6 @@ cd $HOME_DIR/src
. taskcluster/scripts/misc/tooltool-download.sh
# ld needs libLTO.so from llvm
export LD_LIBRARY_PATH=$HOME_DIR/src/clang/lib
# these variables are used in build-clang.py
export CROSS_CCTOOLS_PATH=$HOME_DIR/src/cctools
export CROSS_SYSROOT=$HOME_DIR/src/MacOSX10.11.sdk

Просмотреть файл

@ -10,7 +10,6 @@ COMPRESS_EXT=xz
CROSS_CCTOOLS_PATH=$WORKSPACE/build/src/cctools
CROSS_SYSROOT=$WORKSPACE/build/src/MacOSX10.11.sdk
export LD_LIBRARY_PATH=$WORKSPACE/build/src/clang/lib
export CC=$WORKSPACE/build/src/clang/bin/clang
export CXX=$WORKSPACE/build/src/clang/bin/clang++
export AR=$WORKSPACE/build/src/clang/bin/llvm-ar