Skip to content

Commit 787d078

Browse files
committed
Build build scripts for sysroot using cg_llvm
There is not yet a cg_clif sysroot available when building the sysroot itself
1 parent b8b5a82 commit 787d078

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build_sysroot/build_sysroot.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ popd >/dev/null
1414
rm -r target/*/{debug,release}/{build,deps,examples,libsysroot*,native} 2>/dev/null || true
1515
rm -r sysroot/ 2>/dev/null || true
1616

17+
# Use rustc with cg_clif as hotpluggable backend instead of the custom cg_clif driver so that
18+
# build scripts are still compiled using cg_llvm.
19+
export RUSTC=rustc
20+
export RUSTFLAGS=$RUSTFLAGS" -Ztrim-diagnostic-paths=no -Zcodegen-backend=$(pwd)/../target/"$CHANNEL"/librustc_codegen_cranelift."$dylib_ext" --sysroot $(pwd)/sysroot"
21+
1722
# Build libs
18-
export RUSTFLAGS="$RUSTFLAGS -Z force-unstable-if-unmarked"
23+
export RUSTFLAGS="$RUSTFLAGS -Zforce-unstable-if-unmarked -Cpanic=abort"
1924
if [[ "$1" == "--release" ]]; then
2025
sysroot_channel='release'
2126
# FIXME Enable incremental again once rust-lang/rust#74946 is fixed

0 commit comments

Comments
 (0)