Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync rustc_codegen_cranelift #112671

Merged
merged 118 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
fcbdfe1
Merge from rustc
oli-obk Apr 17, 2023
b05a03b
Merge from rustc
RalfJung Apr 22, 2023
fc7b3eb
Merge from rustc
RalfJung Apr 24, 2023
20571f6
Merge from rustc
RalfJung Apr 26, 2023
7a77541
Merge from rustc
RalfJung Apr 28, 2023
8bf550e
Merge commit 'ef07e8e60f994ec014d049a95591426fb92ebb79' into sync_cg_…
bjorn3 Apr 29, 2023
456ef8b
Merge branch 'sync_from_rust'
bjorn3 Apr 29, 2023
215dd7a
Add some extra instructions for using the precompiled builds
bjorn3 Apr 29, 2023
d530c04
Merge from rustc
RalfJung Apr 30, 2023
249a6f8
Box AssertKind
saethlin May 1, 2023
a4c4937
Restrict `From<S>` for `{D,Subd}iagnosticMessage`.
nnethercote Apr 20, 2023
b7decf2
Sync from rust 473f916d836cc662c5bdbb0d40af9fb4678fab9e
bjorn3 May 4, 2023
edd0e5d
Rustup to rustc 1.71.0-nightly (473f916d8 2023-05-03)
bjorn3 May 4, 2023
7905fa9
Fix rustc test suite
bjorn3 May 4, 2023
332b54a
Rustup to rustc 1.71.0-nightly (74c482104 2023-05-04)
bjorn3 May 5, 2023
4ef286c
Fix rustc test suite
bjorn3 May 5, 2023
dfb1119
Replace once_cell with the newly stabilized std::sync::OnceLock
bjorn3 May 5, 2023
db3faa7
use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regions
kylematsuda Apr 14, 2023
002aa8e
Don't use an allocator shim for `#[global_allocator]`
bjorn3 Jul 3, 2021
5930509
Split AllocatorKind::fn_name in global_fn_name and default_fn_name
bjorn3 Jul 3, 2021
a1d0a90
Use global_fn_name instead of format!
bjorn3 Jul 6, 2021
2253e86
Prevent insta-stable no alloc shim support
bjorn3 Sep 10, 2022
d665640
Sync from rust 2a8221dbdfd180a2d56d4b0089f4f3952d8c2bcd
bjorn3 May 12, 2023
9b2a098
Rustup to rustc 1.71.0-nightly (2a8221dbd 2023-05-11)
bjorn3 May 12, 2023
f6ba10d
Fix rustc test suite
bjorn3 May 12, 2023
ecbb33a
Implement and fix a couple more simd intrinsics
bjorn3 May 12, 2023
899d193
Implement a couple more platform intrinsics
bjorn3 May 12, 2023
e391915
Support _mm_movemask_ps
bjorn3 May 12, 2023
d2a8023
Fix CirrusCI
bjorn3 May 14, 2023
88ae8fc
Allow passing more than two commands to benchmark to hyperfine_command
bjorn3 Feb 11, 2023
a43f083
Benchmark clif release builds with ./y.rs bench
bjorn3 Feb 12, 2023
d16ba45
Merge pull request #1373 from bjorn3/more_bench
bjorn3 May 14, 2023
521d937
Pass --cap-lints=allow to tests
bjorn3 Apr 17, 2023
b773282
Use --sysroot ... instead of --sysroot=...
bjorn3 Feb 15, 2023
8a9b38f
Avoid `&format("...")` calls in error message code.
nnethercote May 16, 2023
74ab27c
Remove `LangItems::require`
Noratrieb May 16, 2023
84644eb
Rollup merge of #111633 - nnethercote:avoid-ref-format, r=WaffleLapkin
Dylan-DPC May 18, 2023
6900c99
Update Cranelift to 0.96.0
bjorn3 Apr 29, 2023
de8a4d5
Remove all implicit "rustc" from rustc_info.rs
bjorn3 Feb 10, 2023
2155c03
Inline Compiler::bootstrap_with_triple
bjorn3 Feb 10, 2023
b1d8b71
Only pass --frozen to cargo when it is passed to y.rs
bjorn3 Feb 12, 2023
22befab
Avoid hard-coding rustc path in prepare.rs
bjorn3 Feb 12, 2023
a2f720d
Allow building and testing without rustup
bjorn3 Feb 13, 2023
a555b8a
Add fixme
bjorn3 Feb 16, 2023
24f1569
Enable overflow-checks on CI
bjorn3 May 22, 2023
a684753
Merge pull request #1374 from bjorn3/non_rustup_build3
bjorn3 May 22, 2023
031bfa6
Print symbol name in PrintOnPanic for define_function
bjorn3 May 23, 2023
c87dfd9
Update Cranelift to 0.96.1
bjorn3 May 23, 2023
a3b816b
Use `is_some_and`/`is_ok_and` in less obvious spots
WaffleLapkin May 24, 2023
5b3bc29
Allow testing a cranelift backend built into rustc itself
bjorn3 Feb 15, 2023
72e67c8
Fix compiling all tests with LLVM
bjorn3 May 24, 2023
134dc33
Fix testing with unstable features disabled
bjorn3 Feb 12, 2023
f9dabd8
Remove ExpnKind::Inlined.
cjgillot May 24, 2023
e6d1a0e
Auto merge of #86844 - bjorn3:global_alloc_improvements, r=pnkfelix
bors May 25, 2023
03f275b
Remove DesugaringKind::Replace.
cjgillot May 25, 2023
8aa3eba
Added build instructions for cranelift backend as part of Rust repo
AngelicosPhosphoros May 21, 2023
2f250c7
Rollup merge of #111950 - cjgillot:expn-noinline, r=oli-obk
compiler-errors May 25, 2023
35acd91
Sync from rust a2b1646c597329d0a25efa3889b66650f65de1de
bjorn3 May 26, 2023
b341529
Rustup to rustc 1.71.0-nightly (a2b1646c5 2023-05-25)
bjorn3 May 26, 2023
202b14c
Fix rustc test suite
bjorn3 May 26, 2023
72b194c
Fix #[cfg(target_os)] for macOS
bjorn3 May 26, 2023
bd45794
Run tests against cg_llvm too in CI
bjorn3 May 26, 2023
be82095
Rollup merge of #111952 - cjgillot:drop-replace, r=WaffleLapkin
GuillaumeGomez May 27, 2023
38b4b98
Remove -preview tag from the llvm-tools component dependency
bjorn3 May 28, 2023
ba0ab0a
Sync from rust cca7ee58110726983951a19d5fb7316d9243925d
bjorn3 May 28, 2023
d91fabd
Rustup to rustc 1.71.0-nightly (cca7ee581 2023-05-27)
bjorn3 May 28, 2023
62e6035
Don't explicitly remove needs-unwind tests
bjorn3 May 28, 2023
4e87728
Replace EarlyBinder(x) with EarlyBinder::new(x)
kylematsuda May 26, 2023
b488625
EarlyBinder::new -> EarlyBinder::bind
lcnr May 29, 2023
a2a8589
Rollup merge of #111827 - AngelicosPhosphoros:add_docs_to_cranelift, …
matthiaskrgr May 29, 2023
04dca8f
Rollup merge of #112060 - lcnr:early-binder, r=jackh726
Noratrieb May 30, 2023
919da2f
remove unchecked_div/_rem from cg_cranelift
scottmcm Jun 1, 2023
fcd93ac
Use translatable diagnostics in `rustc_const_eval`
fee1-dead May 17, 2023
b1961ba
Sync from rust d59363ad0b6391b7fc5bbb02c9ccf9300eef3753
bjorn3 Jun 2, 2023
e369cce
Rustup to rustc 1.72.0-nightly (d59363ad0 2023-06-01)
bjorn3 Jun 2, 2023
4ecd45a
Rollup merge of #112168 - scottmcm:lower-div-rem-unchecked-to-mir, r=…
compiler-errors Jun 2, 2023
f8cde58
Updated cranelift codegen to reflect modified trait signature
ndrewxie Apr 7, 2023
7690070
Implement all vendor intrinsics used by regex on AVX2 systems
bjorn3 Jun 5, 2023
aeac484
Run tests with LLVM sysroot in CI
bjorn3 Jun 5, 2023
1797ae5
Define rust_eh_personality for alloc_example
bjorn3 Jun 5, 2023
8fbd6f5
Skip LLVM sysroot testing for native x86_64-pc-windows-gnu in CI
bjorn3 Jun 5, 2023
204c64b
Merge pull request #1378 from bjorn3/more_vendor_intrinsics
bjorn3 Jun 5, 2023
11b3fc6
Update object to 0.30.4
bjorn3 Jun 6, 2023
f36bb6d
Make unimplemented trap messages show up in more contexts
bjorn3 Jun 6, 2023
e4d0811
Implement _mm_srli_epi16 and _mm_slli_epi16
bjorn3 Jun 6, 2023
c09ef96
Implement _mm_shuffle_epi8
bjorn3 Jun 6, 2023
d4d8f1c
Sync from rust e6d4725c76f3b526c74454bc51afdf6daf133506
bjorn3 Jun 6, 2023
436bed8
Rustup to rustc 1.72.0-nightly (e6d4725c7 2023-06-05)
bjorn3 Jun 6, 2023
c870c67
Sync from rust df77afbcaf3365a32066a8ca4a00ae6fc9a69647
bjorn3 Jun 13, 2023
5d592ea
Rustup to rustc 1.72.0-nightly (df77afbca 2023-06-12)
bjorn3 Jun 13, 2023
45781e1
Fix rustc test suite
bjorn3 Jun 13, 2023
7886be6
remove patch from cranelift backend to ignore unwinding tests
pietroalbini Jun 13, 2023
ce3f300
Add --download-dir option to specify download dir separate from --out…
bjorn3 Feb 13, 2023
d0b8896
Allow building the build system using cargo
bjorn3 Feb 15, 2023
0e41399
Put patched sources in build/ instead of download/
bjorn3 Apr 14, 2023
75327f8
Reuse existing download in y.sh prepare if fresh
bjorn3 Apr 14, 2023
2c38eff
Don't patch in place in apply_patches
bjorn3 May 28, 2023
fc23a8a
Lazily patch coretests
bjorn3 May 28, 2023
b9129c0
Rename a couple of build dirs for consistency
bjorn3 May 28, 2023
54eaa53
Enable compiler-builtins no-asm feature using --features flag
bjorn3 May 28, 2023
3baee66
Rework standard library building
bjorn3 May 29, 2023
67f9fe6
Lazily patch all test projects
bjorn3 May 29, 2023
d3da972
Write stdlib workspace Cargo.toml directly in prepare.rs
bjorn3 May 29, 2023
8ad9e9f
Ensure everything has a lockfile
bjorn3 May 29, 2023
eb3e8bb
Move some profile settings out of the stdlib cargo workspace patch
bjorn3 May 29, 2023
6b9af8c
Disable all incremental compilation for CARGO_BUILD_INCREMENTAL=false
bjorn3 May 29, 2023
d0ea8bb
Only copy library dir for stdlib
bjorn3 May 29, 2023
bcac222
Lazily patch the standard library
bjorn3 Jun 4, 2023
8c1c84d
Copy Cargo.lock over in ./y.sh prepare
bjorn3 Jun 5, 2023
a691b14
Allow skipping tests from the commandline
bjorn3 Jun 5, 2023
485d7e1
Remove outdated fixme
bjorn3 Jun 5, 2023
2445d74
Auto merge of #112314 - ferrocene:pa-core-alloc-abort, r=bjorn3
bors Jun 13, 2023
e9bd63a
Ignore -Clink-arg=-import-instr-limit
bjorn3 Jun 15, 2023
f2895f3
Merge pull request #1357 from bjorn3/build_system_rework6
bjorn3 Jun 15, 2023
c1fa3cf
Sync from rust 8c74a5d27c644a0f7a22bb2fa8dd3ff8257bc220
bjorn3 Jun 15, 2023
8830dcc
Rustup to rustc 1.72.0-nightly (8c74a5d27 2023-06-14)
bjorn3 Jun 15, 2023
82b4972
Merge commit '8830dccd1d4c74f1f69b0d3bd982a3f1fcde5807' into sync_cg_…
bjorn3 Jun 15, 2023
8a120cc
Update tidy allowed deps list
bjorn3 Jun 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler/rustc_codegen_cranelift/.cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
task:
name: freebsd
freebsd_instance:
image: freebsd-13-1-release-amd64
image: freebsd-13-2-release-amd64
setup_rust_script:
- pkg install -y curl git bash
- pkg install -y git bash
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh --default-toolchain none -y --profile=minimal
target_cache:
folder: target
prepare_script:
- . $HOME/.cargo/env
- ./y.rs prepare
- ./y.sh prepare
test_script:
- . $HOME/.cargo/env
- ./y.rs test
- ./y.sh test
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ jobs:
run: rustup set default-host x86_64-pc-windows-gnu

- name: Prepare dependencies
run: ./y.rs prepare
run: ./y.sh prepare

- name: Build
run: ./y.rs build --sysroot none
run: ./y.sh build --sysroot none

- name: Test abi-cafe
env:
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
run: ./y.rs abi-cafe
run: ./y.sh abi-cafe
60 changes: 45 additions & 15 deletions compiler/rustc_codegen_cranelift/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Rustfmt
run: |
cargo fmt --check
rustfmt --check build_system/mod.rs
rustfmt --check build_system/main.rs
rustfmt --check example/*


Expand Down Expand Up @@ -91,22 +91,52 @@ jobs:
sudo apt-get install -y gcc-s390x-linux-gnu qemu-user

- name: Prepare dependencies
run: ./y.rs prepare
run: ./y.sh prepare

- name: Build
run: ./y.sh build --sysroot none

- name: Build without unstable features
- name: Test
env:
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
# This is the config rust-lang/rust uses for builds
run: ./y.rs build --no-unstable-features
run: ./y.sh test

- name: Build
run: ./y.rs build --sysroot none
- name: Install LLVM standard library
run: rustup target add ${{ matrix.env.TARGET_TRIPLE }}

- name: Test
# This is roughly config rust-lang/rust uses for testing
- name: Test with LLVM sysroot
# Skip native x86_64-pc-windows-gnu. It is way too slow and cross-compiled
# x86_64-pc-windows-gnu covers at least part of the tests.
if: matrix.os != 'windows-latest' || matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
env:
TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
run: ./y.rs test
run: ./y.sh test --sysroot llvm --no-unstable-features


# This job doesn't use cg_clif in any way. It checks that all cg_clif tests work with cg_llvm too.
test_llvm:
runs-on: ubuntu-latest
timeout-minutes: 60

defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v3

- name: Prepare dependencies
run: ./y.rs prepare

- name: Disable JIT tests
run: |
sed -i 's/jit./#jit./' config.txt

- name: Test
env:
TARGET_TRIPLE: x86_64-unknown-linux-gnu
run: ./y.rs test --use-backend llvm

bench:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -135,13 +165,13 @@ jobs:
run: cargo install hyperfine || true

- name: Prepare dependencies
run: ./y.rs prepare
run: ./y.sh prepare

- name: Build
run: CI_OPT=1 ./y.rs build --sysroot none
run: CI_OPT=1 ./y.sh build --sysroot none

- name: Benchmark
run: CI_OPT=1 ./y.rs bench
run: CI_OPT=1 ./y.sh bench


dist:
Expand Down Expand Up @@ -194,13 +224,13 @@ jobs:
sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable

- name: Prepare dependencies
run: ./y.rs prepare
run: ./y.sh prepare

- name: Build backend
run: CI_OPT=1 ./y.rs build --sysroot none
run: CI_OPT=1 ./y.sh build --sysroot none

- name: Build sysroot
run: CI_OPT=1 ./y.rs build
run: CI_OPT=1 ./y.sh build

- name: Package prebuilt cg_clif
run: tar cvfJ cg_clif.tar.xz dist
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}

- name: Prepare dependencies
run: ./y.rs prepare
run: ./y.sh prepare

- name: Test
run: ./scripts/test_bootstrap.sh
Expand All @@ -38,7 +38,7 @@ jobs:
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}

- name: Prepare dependencies
run: ./y.rs prepare
run: ./y.sh prepare

- name: Test
run: ./scripts/test_rustc_tests.sh
1 change: 1 addition & 0 deletions compiler/rustc_codegen_cranelift/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
/build_system/target
**/*.rs.bk
*.rlib
*.o
Expand Down
3 changes: 2 additions & 1 deletion compiler/rustc_codegen_cranelift/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"rust-analyzer.imports.granularity.enforce": true,
"rust-analyzer.imports.granularity.group": "module",
"rust-analyzer.imports.prefix": "crate",
"rust-analyzer.cargo.features": ["unstable-features", "__check_build_system_using_ra"],
"rust-analyzer.cargo.features": ["unstable-features"],
"rust-analyzer.linkedProjects": [
"./Cargo.toml",
"./build_system/Cargo.toml",
{
"crates": [
{
Expand Down
Loading