Skip to content

Commit 8bba646

Browse files
committed
Cleanup
1 parent ef037e6 commit 8bba646

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

build_sysroot/build_sysroot.sh

+8
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,11 @@ fi
2828
# Copy files to sysroot
2929
mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
3030
cp -r target/$TARGET_TRIPLE/$sysroot_channel/deps/* sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
31+
32+
# Since we can't override the sysroot for the UI tests anymore, we create a new toolchain and manually overwrite the sysroot directory.
33+
my_toolchain_dir=$HOME/.rustup/toolchains/my_toolchain
34+
rm -rf $my_toolchain_dir
35+
rust_toolchain=$(cat ../rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
36+
cp -r $HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE $my_toolchain_dir
37+
rm -rf $my_toolchain_dir/lib/rustlib/$TARGET_TRIPLE/
38+
cp -r ../build_sysroot/sysroot/* $my_toolchain_dir

src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// FIXME: simple programs now segfault with a sysroot compile in release mode.
2-
31
/*
42
* TODO(antoyo): implement equality in libgccjit based on https://zpz.github.io/blog/overloading-equality-operator-in-cpp-class-hierarchy/ (for type equality?)
53
* TODO(antoyo): support #[inline] attributes.

test.sh

-8
Original file line numberDiff line numberDiff line change
@@ -213,13 +213,7 @@ function setup_rustc() {
213213

214214
rm config.toml || true
215215

216-
# TODO: move these lines to build_sysroot/build_sysroot.sh instead to avoid having to rebuild stage0 libraries everytime?
217-
# Since we can't override the sysroot anymore, we create a new toolchain and manually overwrite the sysroot directory.
218216
my_toolchain_dir=$HOME/.rustup/toolchains/my_toolchain
219-
rm -rf $my_toolchain_dir
220-
cp -r $HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE $my_toolchain_dir
221-
rm -rf $my_toolchain_dir/lib/rustlib/x86_64-unknown-linux-gnu/
222-
cp -r ../build_sysroot/sysroot/* $my_toolchain_dir
223217

224218
cat > config.toml <<EOF
225219
changelog-seen = 2
@@ -230,10 +224,8 @@ deny-warnings = false
230224
231225
[build]
232226
cargo = "$my_toolchain_dir/bin/cargo"
233-
#cargo = "$(rustup which cargo)"
234227
local-rebuild = true
235228
rustc = "$my_toolchain_dir/bin/rustc"
236-
#rustc = "$HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE/bin/rustc"
237229
238230
[target.x86_64-unknown-linux-gnu]
239231
llvm-filecheck = "`which FileCheck-10 || which FileCheck-11 || which FileCheck-12 || which FileCheck-13 || which FileCheck-14`"

0 commit comments

Comments
 (0)