Bug 1690937 - Build sccache with a sysroot. r=firefox-build-system-reviewers,sheehan,mhentges

We can't use the system compiler (gcc) because of
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786883
(which despite being closed, still is a problem)
We could use the linux64-gcc toolchain, but since we're using clang
on other platforms, we might as well do the same.

Differential Revision: https://phabricator.services.mozilla.com/D104129
This commit is contained in:
Mike Hommey 2021-02-09 00:44:02 +00:00
Родитель 7ae7a72a38
Коммит 907f9b6aab
2 изменённых файлов: 6 добавлений и 1 удалений

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

@ -21,13 +21,16 @@ linux64-sccache:
symbol: TL(sccache)
worker-type: b-linux
worker:
docker-image: {in-tree: deb10-toolchain-build}
max-run-time: 1800
run:
toolchain-artifact: public/build/sccache.tar.xz
fetches:
toolchain:
- linux64-rust-1.47
- linux64-clang-11
- linux64-binutils
- linux64-sysroot
macosx64-sccache:
treeherder:

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

@ -33,14 +33,16 @@ COMMON_FEATURES="native-zlib"
case "$(uname -s)" in
Linux)
export CC="$MOZ_FETCHES_DIR/clang/bin/clang"
if [ "$TARGET" == "x86_64-apple-darwin" ]; then
export PATH="$MOZ_FETCHES_DIR/llvm-dsymutil/bin:$PATH"
export PATH="$MOZ_FETCHES_DIR/cctools/bin:$PATH"
export RUSTFLAGS="-C linker=$GECKO_PATH/taskcluster/scripts/misc/osx-cross-linker"
export CC="$MOZ_FETCHES_DIR/clang/bin/clang"
export TARGET_CC="$MOZ_FETCHES_DIR/clang/bin/clang -isysroot $MOZ_FETCHES_DIR/MacOSX10.12.sdk"
cargo build --features "all $COMMON_FEATURES" --verbose --release --target $TARGET
else
export CFLAGS_x86_64_unknown_linux_gnu="--sysroot=$MOZ_FETCHES_DIR/sysroot"
export RUSTFLAGS="-C linker=$CC -C link-arg=--sysroot=$MOZ_FETCHES_DIR/sysroot"
cargo build --features "all dist-server openssl/vendored $COMMON_FEATURES" --verbose --release
fi