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

Similarly to sccache, we need to use clang.

Differential Revision: https://phabricator.services.mozilla.com/D104134
This commit is contained in:
Mike Hommey 2021-02-09 00:44:03 +00:00
Родитель 0c3830eb4e
Коммит 509fddfd3b
2 изменённых файлов: 7 добавлений и 0 удалений

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

@ -23,12 +23,15 @@ linux64-cbindgen:
treeherder: treeherder:
symbol: TL(cbindgen) symbol: TL(cbindgen)
worker: worker:
docker-image: {in-tree: deb10-toolchain-build}
max-run-time: 1800 max-run-time: 1800
run: run:
arguments: ['x86_64-unknown-linux-gnu'] arguments: ['x86_64-unknown-linux-gnu']
fetches: fetches:
toolchain: toolchain:
- linux64-clang-11
- linux64-rust-1.47 - linux64-rust-1.47
- linux64-sysroot
macosx64-cbindgen: macosx64-cbindgen:
treeherder: treeherder:

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

@ -29,6 +29,10 @@ if [ "$TARGET" == "x86_64-apple-darwin" ]; then
export PATH="$MOZ_FETCHES_DIR/llvm-dsymutil/bin:$PATH" export PATH="$MOZ_FETCHES_DIR/llvm-dsymutil/bin:$PATH"
export PATH="$MOZ_FETCHES_DIR/cctools/bin:$PATH" export PATH="$MOZ_FETCHES_DIR/cctools/bin:$PATH"
export RUSTFLAGS="-C linker=$GECKO_PATH/taskcluster/scripts/misc/osx-cross-linker" export RUSTFLAGS="-C linker=$GECKO_PATH/taskcluster/scripts/misc/osx-cross-linker"
elif [ "$TARGET" == "x86_64-unknown-linux-gnu" ]; then
export CC="$MOZ_FETCHES_DIR/clang/bin/clang"
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"
fi fi
export PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH" export PATH="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"