]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_codegen_cranelift/scripts/test_bootstrap.sh
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / compiler / rustc_codegen_cranelift / scripts / test_bootstrap.sh
CommitLineData
6a06907d 1#!/usr/bin/env bash
29967ef6
XL
2set -e
3
fc512014 4cd "$(dirname "$0")/../"
29967ef6
XL
5
6./build.sh
7source build/config.sh
8
9echo "[TEST] Bootstrap of rustc"
10git clone https://github.com/rust-lang/rust.git || true
11pushd rust
12git fetch
13git checkout -- .
fc512014 14git checkout "$(rustc -V | cut -d' ' -f3 | tr -d '(')"
29967ef6
XL
15
16git apply - <<EOF
6a06907d
XL
17diff --git a/Cargo.toml b/Cargo.toml
18index 5bd1147cad5..10d68a2ff14 100644
19--- a/Cargo.toml
20+++ b/Cargo.toml
21@@ -111,5 +111,7 @@ rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
22 rustc-std-workspace-alloc = { path = 'library/rustc-std-workspace-alloc' }
23 rustc-std-workspace-std = { path = 'library/rustc-std-workspace-std' }
24
25+compiler_builtins = { path = "../build_sysroot/compiler-builtins" }
26+
27 [patch."https://github.com/rust-lang/rust-clippy"]
28 clippy_lints = { path = "src/tools/clippy/clippy_lints" }
29967ef6
XL
29diff --git a/compiler/rustc_data_structures/Cargo.toml b/compiler/rustc_data_structures/Cargo.toml
30index 23e689fcae7..5f077b765b6 100644
31--- a/compiler/rustc_data_structures/Cargo.toml
32+++ b/compiler/rustc_data_structures/Cargo.toml
33@@ -32,7 +32,6 @@ tempfile = "3.0.5"
34
35 [dependencies.parking_lot]
36 version = "0.11"
37-features = ["nightly"]
38
39 [target.'cfg(windows)'.dependencies]
40 winapi = { version = "0.3", features = ["fileapi", "psapi"] }
6a06907d
XL
41diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml
42index d95b5b7f17f..00b6f0e3635 100644
43--- a/library/alloc/Cargo.toml
44+++ b/library/alloc/Cargo.toml
45@@ -8,7 +8,7 @@ edition = "2018"
46
47 [dependencies]
48 core = { path = "../core" }
49-compiler_builtins = { version = "0.1.39", features = ['rustc-dep-of-std'] }
50+compiler_builtins = { version = "0.1.39", features = ['rustc-dep-of-std', 'no-asm'] }
51
52 [dev-dependencies]
53 rand = "0.7"
29967ef6
XL
54EOF
55
56cat > config.toml <<EOF
57[llvm]
58ninja = false
59
60[build]
fc512014 61rustc = "$(pwd)/../build/bin/cg_clif"
29967ef6
XL
62cargo = "$(rustup which cargo)"
63full-bootstrap = true
64local-rebuild = true
65
66[rust]
67codegen-backends = ["cranelift"]
68EOF
69
70rm -r compiler/rustc_codegen_cranelift/{Cargo.*,src}
71cp ../Cargo.* compiler/rustc_codegen_cranelift/
72cp -r ../src compiler/rustc_codegen_cranelift/src
73
74./x.py build --stage 1 library/std
75popd