]>
Commit | Line | Data |
---|---|---|
04454e1e | 1 | #!/usr/bin/env bash |
cdc7bbd5 XL |
2 | set -e |
3 | ||
c0240ec0 | 4 | # CG_CLIF_FORCE_GNU_AS will force usage of as instead of the LLVM backend of rustc as |
4b012472 FG |
5 | # the LLVM backend isn't compiled in here. |
6 | export CG_CLIF_FORCE_GNU_AS=1 | |
7 | ||
ed00b5ec FG |
8 | # Compiletest expects all standard library paths to start with /rustc/FAKE_PREFIX. |
9 | # CG_CLIF_STDLIB_REMAP_PATH_PREFIX will cause cg_clif's build system to pass | |
10 | # --remap-path-prefix to handle this. | |
4b012472 | 11 | CG_CLIF_STDLIB_REMAP_PATH_PREFIX=/rustc/FAKE_PREFIX ./y.sh build |
cdc7bbd5 XL |
12 | |
13 | echo "[SETUP] Rust fork" | |
c0240ec0 | 14 | git clone --quiet https://github.com/rust-lang/rust.git --filter=tree:0 || true |
cdc7bbd5 XL |
15 | pushd rust |
16 | git fetch | |
c0240ec0 FG |
17 | git checkout --no-progress -- . |
18 | git checkout --no-progress "$(rustc -V | cut -d' ' -f3 | tr -d '(')" | |
19 | ||
20 | git submodule update --quiet --init src/tools/cargo library/backtrace library/stdarch | |
cdc7bbd5 | 21 | |
add651ee FG |
22 | git -c user.name=Dummy -c user.email=dummy@example.com -c commit.gpgSign=false \ |
23 | am ../patches/*-stdlib-*.patch | |
2b03887a | 24 | |
cdc7bbd5 | 25 | cat > config.toml <<EOF |
c0240ec0 | 26 | change-id = 999999 |
cdc7bbd5 XL |
27 | |
28 | [build] | |
353b0b11 | 29 | rustc = "$(pwd)/../dist/bin/rustc-clif" |
cdc7bbd5 XL |
30 | cargo = "$(rustup which cargo)" |
31 | full-bootstrap = true | |
32 | local-rebuild = true | |
33 | ||
34 | [rust] | |
35 | codegen-backends = ["cranelift"] | |
36 | deny-warnings = false | |
a2a8927a | 37 | verbose-tests = false |
cdc7bbd5 XL |
38 | EOF |
39 | popd | |
064997fb | 40 | |
2b03887a FG |
41 | # Allow the testsuite to use llvm tools |
42 | host_triple=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ") | |
43 | export LLVM_BIN_DIR="$(rustc --print sysroot)/lib/rustlib/$host_triple/bin" |