]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_codegen_cranelift/scripts/setup_rust_fork.sh
bump version to 1.80.1+dfsg1-1~bpo12+pve1
[rustc.git] / compiler / rustc_codegen_cranelift / scripts / setup_rust_fork.sh
CommitLineData
04454e1e 1#!/usr/bin/env bash
cdc7bbd5
XL
2set -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.
6export 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 11CG_CLIF_STDLIB_REMAP_PATH_PREFIX=/rustc/FAKE_PREFIX ./y.sh build
cdc7bbd5
XL
12
13echo "[SETUP] Rust fork"
c0240ec0 14git clone --quiet https://github.com/rust-lang/rust.git --filter=tree:0 || true
cdc7bbd5
XL
15pushd rust
16git fetch
c0240ec0
FG
17git checkout --no-progress -- .
18git checkout --no-progress "$(rustc -V | cut -d' ' -f3 | tr -d '(')"
19
20git submodule update --quiet --init src/tools/cargo library/backtrace library/stdarch
cdc7bbd5 21
add651ee
FG
22git -c user.name=Dummy -c user.email=dummy@example.com -c commit.gpgSign=false \
23 am ../patches/*-stdlib-*.patch
2b03887a 24
cdc7bbd5 25cat > config.toml <<EOF
c0240ec0 26change-id = 999999
cdc7bbd5
XL
27
28[build]
353b0b11 29rustc = "$(pwd)/../dist/bin/rustc-clif"
cdc7bbd5
XL
30cargo = "$(rustup which cargo)"
31full-bootstrap = true
32local-rebuild = true
33
34[rust]
35codegen-backends = ["cranelift"]
36deny-warnings = false
a2a8927a 37verbose-tests = false
cdc7bbd5
XL
38EOF
39popd
064997fb 40
2b03887a
FG
41# Allow the testsuite to use llvm tools
42host_triple=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
43export LLVM_BIN_DIR="$(rustc --print sysroot)/lib/rustlib/$host_triple/bin"