]>
Commit | Line | Data |
---|---|---|
04454e1e | 1 | #!/usr/bin/env bash |
cdc7bbd5 XL |
2 | set -e |
3 | ||
fe692bf9 | 4 | ./y.sh build --no-unstable-features |
cdc7bbd5 XL |
5 | |
6 | echo "[SETUP] Rust fork" | |
7 | git clone https://github.com/rust-lang/rust.git || true | |
8 | pushd rust | |
9 | git fetch | |
10 | git checkout -- . | |
11 | git checkout "$(rustc -V | cut -d' ' -f3 | tr -d '(')" | |
12 | ||
add651ee FG |
13 | git -c user.name=Dummy -c user.email=dummy@example.com -c commit.gpgSign=false \ |
14 | am ../patches/*-stdlib-*.patch | |
2b03887a | 15 | |
cdc7bbd5 | 16 | git apply - <<EOF |
cdc7bbd5 XL |
17 | diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml |
18 | index d95b5b7f17f..00b6f0e3635 100644 | |
19 | --- a/library/alloc/Cargo.toml | |
20 | +++ b/library/alloc/Cargo.toml | |
21 | @@ -8,7 +8,7 @@ edition = "2018" | |
22 | ||
23 | [dependencies] | |
24 | core = { path = "../core" } | |
17df50a5 | 25 | -compiler_builtins = { version = "0.1.40", features = ['rustc-dep-of-std'] } |
a2a8927a | 26 | +compiler_builtins = { version = "0.1.66", features = ['rustc-dep-of-std', 'no-asm'] } |
cdc7bbd5 XL |
27 | |
28 | [dev-dependencies] | |
9ffffee4 FG |
29 | rand = { version = "0.8.5", default-features = false, features = ["alloc"] } |
30 | rand_xorshift = "0.3.0" | |
cdc7bbd5 XL |
31 | EOF |
32 | ||
33 | cat > config.toml <<EOF | |
5e7ed085 FG |
34 | changelog-seen = 2 |
35 | ||
cdc7bbd5 XL |
36 | [llvm] |
37 | ninja = false | |
38 | ||
39 | [build] | |
353b0b11 | 40 | rustc = "$(pwd)/../dist/bin/rustc-clif" |
cdc7bbd5 XL |
41 | cargo = "$(rustup which cargo)" |
42 | full-bootstrap = true | |
43 | local-rebuild = true | |
44 | ||
45 | [rust] | |
46 | codegen-backends = ["cranelift"] | |
47 | deny-warnings = false | |
a2a8927a | 48 | verbose-tests = false |
cdc7bbd5 XL |
49 | EOF |
50 | popd | |
064997fb FG |
51 | |
52 | # FIXME remove once inline asm is fully supported | |
53 | export RUSTFLAGS="$RUSTFLAGS --cfg=rustix_use_libc" | |
2b03887a | 54 | |
add651ee | 55 | export CFG_VIRTUAL_RUST_SOURCE_BASE_DIR="$(cd build/stdlib; pwd)" |
9c376795 | 56 | |
2b03887a FG |
57 | # Allow the testsuite to use llvm tools |
58 | host_triple=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ") | |
59 | export LLVM_BIN_DIR="$(rustc --print sysroot)/lib/rustlib/$host_triple/bin" |