about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xbuild_sysroot/build_sysroot.sh8
-rw-r--r--src/lib.rs2
-rwxr-xr-xtest.sh8
3 files changed, 8 insertions, 10 deletions
diff --git a/build_sysroot/build_sysroot.sh b/build_sysroot/build_sysroot.sh
index 9d692d599f6..dc80e4fff80 100755
--- a/build_sysroot/build_sysroot.sh
+++ b/build_sysroot/build_sysroot.sh
@@ -28,3 +28,11 @@ fi
 # Copy files to sysroot
 mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
 cp -r target/$TARGET_TRIPLE/$sysroot_channel/deps/* sysroot/lib/rustlib/$TARGET_TRIPLE/lib/
+
+# Since we can't override the sysroot for the UI tests anymore, we create a new toolchain and manually overwrite the sysroot directory.
+my_toolchain_dir=$HOME/.rustup/toolchains/my_toolchain
+rm -rf $my_toolchain_dir
+rust_toolchain=$(cat ../rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
+cp -r $HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE $my_toolchain_dir
+rm -rf $my_toolchain_dir/lib/rustlib/$TARGET_TRIPLE/
+cp -r ../build_sysroot/sysroot/* $my_toolchain_dir
diff --git a/src/lib.rs b/src/lib.rs
index 7a89a449b69..2a6b642782d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,5 +1,3 @@
-// FIXME: simple programs now segfault with a sysroot compile in release mode.
-
 /*
  * TODO(antoyo): implement equality in libgccjit based on https://zpz.github.io/blog/overloading-equality-operator-in-cpp-class-hierarchy/ (for type equality?)
  * TODO(antoyo): support #[inline] attributes.
diff --git a/test.sh b/test.sh
index 72753e1d466..a6e87fca162 100755
--- a/test.sh
+++ b/test.sh
@@ -213,13 +213,7 @@ function setup_rustc() {
 
     rm config.toml || true
 
-    # TODO: move these lines to build_sysroot/build_sysroot.sh instead to avoid having to rebuild stage0 libraries everytime?
-    # Since we can't override the sysroot anymore, we create a new toolchain and manually overwrite the sysroot directory.
     my_toolchain_dir=$HOME/.rustup/toolchains/my_toolchain
-    rm -rf $my_toolchain_dir
-    cp -r $HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE $my_toolchain_dir
-    rm -rf $my_toolchain_dir/lib/rustlib/x86_64-unknown-linux-gnu/
-    cp -r ../build_sysroot/sysroot/* $my_toolchain_dir
 
     cat > config.toml <<EOF
 changelog-seen = 2
@@ -230,10 +224,8 @@ deny-warnings = false
 
 [build]
 cargo = "$my_toolchain_dir/bin/cargo"
-#cargo = "$(rustup which cargo)"
 local-rebuild = true
 rustc = "$my_toolchain_dir/bin/rustc"
-#rustc = "$HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE/bin/rustc"
 
 [target.x86_64-unknown-linux-gnu]
 llvm-filecheck = "`which FileCheck-10 || which FileCheck-11 || which FileCheck-12 || which FileCheck-13 || which FileCheck-14`"