# cctools sometimes needs to be rebuilt when clang is modified. # Until bug 1471905 is addressed, increase the following number # when a forced rebuild of cctools is necessary: 1
# Set some crosstools-port and libtapi directories
CROSSTOOLS_SOURCE_DIR=$MOZ_FETCHES_DIR/cctools-port
CROSSTOOLS_CCTOOLS_DIR=$CROSSTOOLS_SOURCE_DIR/cctools
CROSSTOOLS_BUILD_DIR=$WORKSPACE/cctools
LIBTAPI_SOURCE_DIR=$MOZ_FETCHES_DIR/apple-libtapi
LIBTAPI_BUILD_DIR=$WORKSPACE/libtapi-build
LDID_SOURCE_DIR=$MOZ_FETCHES_DIR/ldid
CLANG_DIR=$MOZ_FETCHES_DIR/clang
# Common setup for libtapi and cctools export CC=$CLANG_DIR/bin/clang export CXX=$CLANG_DIR/bin/clang++ # 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
# Build libtapi; the included build.sh is not sufficient for our purposes.
cd $LIBTAPI_BUILD_DIR
# Values taken from build.sh
TAPI_REPOSITORY=tapi-1000.10.8
TAPI_VERSION=10.0.0
# Setup LDFLAGS late so run-at-build-time tools in the basic clang build don't # pick up the possibly-incompatible libstdc++ from clang. # 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="-fuse-ld=lld -lpthread -Wl,-rpath-link,$MOZ_FETCHES_DIR/sysroot/lib/x86_64-linux-gnu -Wl,-rpath-link,$MOZ_FETCHES_DIR/sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath,\\\$\$ORIGIN/../lib,-rpath,\\\$\$ORIGIN/../../clang/lib"
# Configure crosstools-port
cd $CROSSTOOLS_CCTOOLS_DIR
patch -p2 < $GECKO_PATH/taskcluster/scripts/misc/cctools.patch
# Force re-libtoolization to overwrite files with the new libtool bits.
perl -pi -e 's/(LIBTOOLIZE -c)/\1 -f/' autogen.sh
./autogen.sh
./configure \
--prefix=$CROSSTOOLS_BUILD_DIR \
--target=x86_64-apple-darwin \
--with-llvm-config=$CLANG_DIR/bin/llvm-config \
--enable-lto-support \
--enable-tapi-support \
--with-libtapi=$CROSSTOOLS_BUILD_DIR
# Build cctools make -j `nproc --all` install
# Build ldid
cd $LDID_SOURCE_DIR # The crypto library in the sysroot cannot be linked in a PIE executable so we use -no-pie make -j `nproc --all` install INSTALLPREFIX=$CROSSTOOLS_BUILD_DIR LDFLAGS="-no-pie -Wl,-Bstatic -lcrypto -Wl,-Bdynamic -ldl -pthread"
strip $CROSSTOOLS_BUILD_DIR/bin/* # various build scripts based on cmake want to find `lipo` without a prefix cp $CROSSTOOLS_BUILD_DIR/bin/x86_64-apple-darwin-lipo $CROSSTOOLS_BUILD_DIR/bin/lipo
(cd $CROSSTOOLS_BUILD_DIR/bin/; for i in x86_64-apple-darwin-*; do
ln $i aarch64${i#x86_64} done)
# Put a tarball in the artifacts dir
mkdir -p $UPLOAD_DIR
tar caf $UPLOAD_DIR/cctools.tar.zst -C $CROSSTOOLS_BUILD_DIR/.. `basename $CROSSTOOLS_BUILD_DIR`
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.