4 ./y.rs build --no-unstable-features
6 echo "[SETUP] Rust fork"
7 git clone https://github.com/rust-lang/rust.git || true
11 git checkout "$(rustc -V | cut -d' ' -f3 | tr -d '(')"
13 git am ../patches/*-sysroot-*.patch
16 diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml
17 index d95b5b7f17f..00b6f0e3635 100644
18 --- a/library/alloc/Cargo.toml
19 +++ b/library/alloc/Cargo.toml
20 @@ -8,7 +8,7 @@ edition = "2018"
23 core = { path = "../core" }
24 -compiler_builtins = { version = "0.1.40", features = ['rustc-dep-of-std'] }
25 +compiler_builtins = { version = "0.1.66", features = ['rustc-dep-of-std', 'no-asm'] }
30 diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
31 index 8431aa7b818..a3ff7e68ce5 100644
32 --- a/src/tools/compiletest/src/runtest.rs
33 +++ b/src/tools/compiletest/src/runtest.rs
34 @@ -3489,12 +3489,7 @@ fn normalize_output(&self, output: &str, custom_rules: &[(String, String)]) -> S
35 let compiler_src_dir = base_dir.join("compiler");
36 normalize_path(&compiler_src_dir, "$(echo '$COMPILER_DIR')");
38 - if let Some(virtual_rust_source_base_dir) =
39 - option_env!("CFG_VIRTUAL_RUST_SOURCE_BASE_DIR").map(PathBuf::from)
41 - normalize_path(&virtual_rust_source_base_dir.join("library"), "$(echo '$SRC_DIR')");
42 - normalize_path(&virtual_rust_source_base_dir.join("compiler"), "$(echo '$COMPILER_DIR')");
44 + normalize_path(&Path::new("$(cd ../build_sysroot/sysroot_src/library; pwd)"), "$(echo '$SRC_DIR')");
46 // Paths into the build directory
47 let test_build_dir = &self.config.build_base;
50 cat > config.toml <<EOF
57 rustc = "$(pwd)/../build/rustc-clif"
58 cargo = "$(rustup which cargo)"
63 codegen-backends = ["cranelift"]
69 # FIXME remove once inline asm is fully supported
70 export RUSTFLAGS="$RUSTFLAGS --cfg=rustix_use_libc"
72 # Allow the testsuite to use llvm tools
73 host_triple=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
74 export LLVM_BIN_DIR="$(rustc --print sysroot)/lib/rustlib/$host_triple/bin"