]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_codegen_cranelift/scripts/test_bootstrap.sh
New upstream version 1.49.0~beta.4+dfsg1
[rustc.git] / compiler / rustc_codegen_cranelift / scripts / test_bootstrap.sh
1 #!/bin/bash
2 set -e
3
4 cd $(dirname "$0")/../
5
6 ./build.sh
7 source build/config.sh
8
9 echo "[TEST] Bootstrap of rustc"
10 git clone https://github.com/rust-lang/rust.git || true
11 pushd rust
12 git fetch
13 git checkout -- .
14 git checkout $(rustc -V | cut -d' ' -f3 | tr -d '(')
15
16 git apply - <<EOF
17 diff --git a/.gitmodules b/.gitmodules
18 index 984113151de..c1e9d960d56 100644
19 --- a/.gitmodules
20 +++ b/.gitmodules
21 @@ -34,10 +34,6 @@
22 [submodule "src/doc/edition-guide"]
23 path = src/doc/edition-guide
24 url = https://github.com/rust-lang/edition-guide.git
25 -[submodule "src/llvm-project"]
26 - path = src/llvm-project
27 - url = https://github.com/rust-lang/llvm-project.git
28 - branch = rustc/11.0-2020-10-12
29 [submodule "src/doc/embedded-book"]
30 path = src/doc/embedded-book
31 url = https://github.com/rust-embedded/book.git
32 diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml
33 index 23e689fcae7..5f077b765b6 100644
34 --- a/compiler/rustc_data_structures/Cargo.toml
35 +++ b/compiler/rustc_data_structures/Cargo.toml
36 @@ -32,7 +32,6 @@ tempfile = "3.0.5"
37
38 [dependencies.parking_lot]
39 version = "0.11"
40 -features = ["nightly"]
41
42 [target.'cfg(windows)'.dependencies]
43 winapi = { version = "0.3", features = ["fileapi", "psapi"] }
44 EOF
45
46 cat > config.toml <<EOF
47 [llvm]
48 ninja = false
49
50 [build]
51 rustc = "$(pwd)/../build/cg_clif"
52 cargo = "$(rustup which cargo)"
53 full-bootstrap = true
54 local-rebuild = true
55
56 [rust]
57 codegen-backends = ["cranelift"]
58 EOF
59
60 rm -r compiler/rustc_codegen_cranelift/{Cargo.*,src}
61 cp ../Cargo.* compiler/rustc_codegen_cranelift/
62 cp -r ../src compiler/rustc_codegen_cranelift/src
63
64 ./x.py build --stage 1 library/std
65 popd