summaryrefslogtreecommitdiff
path: root/build-chroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-chroot.sh')
-rwxr-xr-xbuild-chroot.sh17
1 files changed, 9 insertions, 8 deletions
diff --git a/build-chroot.sh b/build-chroot.sh
index eea69ab..7c8ffdc 100755
--- a/build-chroot.sh
+++ b/build-chroot.sh
@@ -760,12 +760,6 @@ cd mrustc-*/
# FIXME: The optimize(-O) flag has been patched out of minicargo because clang
# optimizes essential parts of code generated by mrustc. ~ahill
patch -p1 < /maple/patches/mrustc-maple.patch
-# NOTE: Rust's unwind crate attempts to link with libgcc_s, even on a musl-based
-# system. Enabling the "system-llvm-unwind" feature fixes this. ~ahill
-echo "[add.'library/panic_unwind'.dependencies.unwind]" >> rustc-$RUST_VERSION-overrides.toml
-echo "features = [\"system-llvm-libunwind\"]" >> rustc-$RUST_VERSION-overrides.toml
-echo "[add.'library/std'.dependencies.unwind]" >> rustc-$RUST_VERSION-overrides.toml
-echo "features = [\"system-llvm-libunwind\"]" >> rustc-$RUST_VERSION-overrides.toml
# FIXME: I have no idea how, but this script somehow invokes the now
# non-existent version of clang++ from /maple/tools. Will need to look
# into this further. CXX=clang++ exists to fix this temporarily. ~ahill
@@ -781,6 +775,12 @@ cd rustc-*-src/
RUST_VERSION=$(pwd | sed -r "s/.*rustc-(.*)-src/\1/")
patch -p0 < ../rustc-$RUST_VERSION-src.patch
cd ..
+# NOTE: Rust's unwind crate attempts to link with libgcc_s, even on a musl-based
+# system. Enabling the "system-llvm-unwind" feature fixes this. ~ahill
+echo "[add.'library/panic_unwind'.dependencies.unwind]" >> rustc-$RUST_VERSION-overrides.toml
+echo "features = [\"system-llvm-libunwind\"]" >> rustc-$RUST_VERSION-overrides.toml
+echo "[add.'library/std'.dependencies.unwind]" >> rustc-$RUST_VERSION-overrides.toml
+echo "features = [\"system-llvm-libunwind\"]" >> rustc-$RUST_VERSION-overrides.toml
# NOTE: mrustc defaults to 1.29, which means macros such as asm! do not function
# correctly unless you manually define MRUSTC_TARGET_VER. ~ahill
export MRUSTC_TARGET_VER=$(echo $RUST_VERSION | sed "s/\.[^.]*$//")
@@ -845,8 +845,9 @@ rm -rf openssl-sys*
tar xf ../../../../sources/openssl-sys-*.crate
# NOTE: This silences warnings from our newly-built cargo complaining about missing
# checksums for a vendored crate
-echo "{\"files\":{}}" > openssl-sys-*/.cargo-checksum.json
-cd ../..
+cd openssl-sys-*/
+echo "{\"files\":{}}" > .cargo-checksum.json
+cd ../../..
./bin/minicargo \
--vendor-dir rustc-$RUST_VERSION-src/vendor \
--output-dir $(pwd)/build-cargo \