forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#78624 - bjorn3:update_cg_clif-2020-11-01, r…
…=jyn514 Sync rustc_codegen_cranelift This fixes bootstrapping of rustc using cg_clif again. It regressed a while before rust-lang#77975 got merged. Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/743
- Loading branch information
Showing
53 changed files
with
612 additions
and
388 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
compiler/rustc_codegen_cranelift/.github/workflows/bootstrap_rustc.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Bootstrap rustc using cg_clif | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
bootstrap_rustc: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache cargo installed crates | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cargo/bin | ||
key: ${{ runner.os }}-cargo-installed-crates | ||
|
||
- name: Cache cargo registry and index | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo target dir | ||
uses: actions/cache@v2 | ||
with: | ||
path: target | ||
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }} | ||
|
||
- name: Prepare dependencies | ||
run: | | ||
git config --global user.email "user@example.com" | ||
git config --global user.name "User" | ||
./prepare.sh | ||
- name: Test | ||
run: | | ||
# Enable backtraces for easier debugging | ||
export RUST_BACKTRACE=1 | ||
./scripts/test_bootstrap.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Settings | ||
export CHANNEL="release" | ||
build_sysroot=1 | ||
target_dir='build' | ||
while [[ $# != 0 ]]; do | ||
case $1 in | ||
"--debug") | ||
export CHANNEL="debug" | ||
;; | ||
"--without-sysroot") | ||
build_sysroot=0 | ||
;; | ||
"--target-dir") | ||
target_dir=$2 | ||
shift | ||
;; | ||
*) | ||
echo "Unknown flag '$1'" | ||
echo "Usage: ./build.sh [--debug] [--without-sysroot] [--target-dir DIR]" | ||
;; | ||
esac | ||
shift | ||
done | ||
|
||
# Build cg_clif | ||
export RUSTFLAGS="-Zrun_dsymutil=no" | ||
if [[ "$CHANNEL" == "release" ]]; then | ||
cargo build --release | ||
else | ||
cargo build | ||
fi | ||
|
||
rm -rf $target_dir | ||
mkdir $target_dir | ||
cp -a target/$CHANNEL/cg_clif{,_build_sysroot} target/$CHANNEL/*rustc_codegen_cranelift* $target_dir/ | ||
cp -a rust-toolchain scripts/config.sh scripts/cargo.sh $target_dir | ||
|
||
if [[ "$build_sysroot" == "1" ]]; then | ||
echo "[BUILD] sysroot" | ||
export CG_CLIF_INCR_CACHE_DISABLED=1 | ||
dir=$(pwd) | ||
cd $target_dir | ||
time $dir/build_sysroot/build_sysroot.sh | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash --verbose | ||
set -e | ||
|
||
rm -rf target/ build_sysroot/{sysroot/,sysroot_src/,target/} perf.data{,.old} | ||
rm -rf target/ build/ build_sysroot/{sysroot_src/,target/} perf.data{,.old} | ||
rm -rf rand/ regex/ simple-raytracer/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.