]> git.lizzy.rs Git - rust.git/blob - scripts/setup_rust_fork.sh
Sync from rust 4800c7816ee1937d028407066d229f74b4673c92
[rust.git] / scripts / setup_rust_fork.sh
1 #!/bin/bash
2 set -e
3
4 ./y.rs build --no-unstable-features
5 source scripts/config.sh
6
7 echo "[SETUP] Rust fork"
8 git clone https://github.com/rust-lang/rust.git || true
9 pushd rust
10 git fetch
11 git checkout -- .
12 git checkout "$(rustc -V | cut -d' ' -f3 | tr -d '(')"
13
14 git apply - <<EOF
15 diff --git a/Cargo.toml b/Cargo.toml
16 index 5bd1147cad5..10d68a2ff14 100644
17 --- a/Cargo.toml
18 +++ b/Cargo.toml
19 @@ -111,5 +111,7 @@ rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
20  rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
21  rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
22
23 +compiler_builtins = { path = "../build_sysroot/compiler-builtins" }
24 +
25  [patch."https://github.com/rust-lang/rust-clippy"]
26  clippy_lints = { path = "src/tools/clippy/clippy_lints" }
27 diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml
28 index d95b5b7f17f..00b6f0e3635 100644
29 --- a/library/alloc/Cargo.toml
30 +++ b/library/alloc/Cargo.toml
31 @@ -8,7 +8,7 @@ edition = "2018"
32
33  [dependencies]
34  core = { path = "../core" }
35 -compiler_builtins = { version = "0.1.40", features = ['rustc-dep-of-std'] }
36 +compiler_builtins = { version = "0.1.66", features = ['rustc-dep-of-std', 'no-asm'] }
37
38  [dev-dependencies]
39  rand = "0.7"
40  rand_xorshift = "0.2"
41 diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
42 index 887d27fd6dca4..2c2239f2b83d1 100644
43 --- a/src/tools/compiletest/src/header.rs
44 +++ b/src/tools/compiletest/src/header.rs
45 @@ -806,8 +806,8 @@ pub fn make_test_description<R: Read>(
46      cfg: Option<&str>,
47  ) -> test::TestDesc {
48      let mut ignore = false;
49      #[cfg(not(bootstrap))]
50 -    let ignore_message: Option<String> = None;
51 +    let ignore_message: Option<&str> = None;
52      let mut should_fail = false;
53
54      let rustc_has_profiler_support = env::var_os("RUSTC_PROFILER_SUPPORT").is_some();
55
56 EOF
57
58 cat > config.toml <<EOF
59 [llvm]
60 ninja = false
61
62 [build]
63 rustc = "$(pwd)/../build/bin/cg_clif"
64 cargo = "$(rustup which cargo)"
65 full-bootstrap = true
66 local-rebuild = true
67
68 [rust]
69 codegen-backends = ["cranelift"]
70 deny-warnings = false
71 verbose-tests = false
72 EOF
73 popd