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

Rollup of 8 pull requests #127169

Closed
wants to merge 89 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
0a298ed
Show files produced by --emit foo in json artifact notifications
pacak Apr 6, 2024
ed7d97e
Merge commit '3270432f4b0583104c8b9b6f695bf97d6bbf3ac2' into sync_cg_…
bjorn3 May 13, 2024
f0dffd9
Merge branch 'sync_from_rust'
bjorn3 May 13, 2024
8aa7112
Rename Unsafe to Safety
spastorino May 17, 2024
6965b4a
Remove `Rvalue::CheckedBinaryOp`
scottmcm May 16, 2024
0c204c3
Sync from rust b1ec1bd65f89c1375d2cf2fb733a87ef390276d3
bjorn3 May 19, 2024
bff31bd
Rustup to rustc 1.80.0-nightly (b1ec1bd65 2024-05-18)
bjorn3 May 19, 2024
8cea8a7
Fix rustc test suite
bjorn3 May 19, 2024
7a53ba2
cg_clif: support simd_ctpop
workingjubilee May 20, 2024
14134c1
Rollup merge of #125173 - scottmcm:never-checked, r=davidtwco
matthiaskrgr May 20, 2024
39daa5a
Update to Cranelift 0.108
bjorn3 May 20, 2024
2c219ce
Rollup merge of #125266 - workingjubilee:stream-plastic-love, r=RalfJ…
matthiaskrgr May 21, 2024
715f226
rustc_codegen_llvm: add support for writing summary bitcode
durin42 Jan 19, 2024
cc6c5ec
Sync from rust 9cdfe285ca724c801dc9f78d22b24ea69b787f26
bjorn3 May 23, 2024
8bb463a
Rustup to rustc 1.80.0-nightly (9cdfe285c 2024-05-22)
bjorn3 May 23, 2024
ba8c695
Stop passing --check-cfg to rustc
bjorn3 May 23, 2024
05b1415
Rollup merge of #125345 - durin42:thin-link-bitcode, r=bjorn3
GuillaumeGomez May 23, 2024
9ddcc59
Omit non-needs_drop drop_in_place in vtables
Mark-Simulacrum Mar 17, 2024
676fec7
Add an intrinsic for `ptr::metadata`
scottmcm Apr 21, 2024
db4dbc8
Rollup merge of #124251 - scottmcm:unop-ptr-metadata, r=oli-obk
jieyouxu May 29, 2024
a0ea60b
Sync from rust debd22da66cfa97c74040ebf68e420672ac8560e
bjorn3 May 30, 2024
a255965
Rustup to rustc 1.80.0-nightly (debd22da6 2024-05-29)
bjorn3 May 30, 2024
ab10da2
Fix rustc test suite
bjorn3 May 30, 2024
8f1d41e
Implement _rdtsc x86 vendor intrinsic
bjorn3 Jun 2, 2024
be961b0
Auto merge of #122597 - pacak:master, r=bjorn3
bors Jun 4, 2024
eb449c1
Move error on -Cinstrument-coverage earlier and elaborate that it is …
bjorn3 Jun 4, 2024
97d47f7
Fix rustc tests
bjorn3 Jun 4, 2024
4067700
Don't require the bench job to pass for a new release
bjorn3 Jun 4, 2024
632e5df
Remove unreachable fatal error
bjorn3 Jun 4, 2024
5d0ec8d
Misc fixes to cranelift/clippy/miri
BoxyUwU Jun 4, 2024
63cb28e
add `llvm.x86.sse2.cvtps2dq`
folkertdev Jun 6, 2024
c511676
Merge pull request #1495 from folkertdev/add-llvm-sse2-cvtps2dq
bjorn3 Jun 6, 2024
6210c26
offset_of: allow (unstably) taking the offset of slice tail fields
RalfJung Jun 8, 2024
0eb782b
ScalarInt: size mismatches are a bug, do not delay the panic
RalfJung Jun 8, 2024
c0477a1
Sync from rust b5b13568fb5da4ac988bde370008d6134d3dfe6c
bjorn3 Jun 11, 2024
c06cbc8
Rustup to rustc 1.81.0-nightly (b5b13568f 2024-06-10)
bjorn3 Jun 11, 2024
ee188ca
Fix rustc test suite
bjorn3 Jun 11, 2024
02b20f8
Update a cranelift patch file for formatting changes.
nnethercote Jun 11, 2024
0b7375f
Use `tidy` to sort crate attributes for all compiler crates.
nnethercote Jun 12, 2024
4e0af7c
Require any function with a tait in its signature to actually constra…
oli-obk Jun 10, 2024
03a2764
Rollup merge of #126301 - nnethercote:sort-crate-attributes, r=davidtwco
workingjubilee Jun 12, 2024
c7d3c4f
Auto merge of #126319 - workingjubilee:rollup-lendnud, r=workingjubilee
bors Jun 12, 2024
c867677
Use is_lang_item more aggressively
compiler-errors Jun 14, 2024
5ccfa78
Only compute vtable information during codegen
compiler-errors Jun 15, 2024
5c6849b
Auto merge of #126505 - compiler-errors:no-vtable, r=lcnr
bors Jun 16, 2024
54aa510
Rename InstanceDef -> InstanceKind
compiler-errors Jun 17, 2024
0d1d004
Sync from rust d7f6ebacee13b6c03623c4b74197280454ede8de
bjorn3 Jun 17, 2024
a4b36e5
Rustup to rustc 1.81.0-nightly (d7f6ebace 2024-06-16)
bjorn3 Jun 17, 2024
e241176
Fix rustc tests
bjorn3 Jun 17, 2024
afef64c
Use a dedicated type instead of a reference for the diagnostic context
oli-obk Jun 18, 2024
88a5f32
Sync from rust 59e2c01c2217a01546222e4d9ff4e6695ee8a1db
bjorn3 Jun 18, 2024
c5bd2e3
Rustup to rustc 1.81.0-nightly (59e2c01c2 2024-06-17)
bjorn3 Jun 18, 2024
729cb08
Fix rustc tests
bjorn3 Jun 18, 2024
1cb7282
Re-enable `tests/run-make/const_fn_mir` (#1497)
GuillaumeGomez Jun 18, 2024
e79dc76
`bug!` more uses of these in runtime stuff
scottmcm Jun 15, 2024
8556604
Fix varargs support on `aarch64-apple-darwin`
beetrees Jun 18, 2024
b0fcf2e
Add `aarch64-apple-darwin` to CI
beetrees Jun 18, 2024
cdad523
Merge pull request #1500 from beetrees/mac-arm64-va-call
bjorn3 Jun 20, 2024
2a37825
Update to Cranelift 0.109
bjorn3 Jun 5, 2024
aa5d7a0
Update platform support table for the new arm64 macOS support
bjorn3 Jun 21, 2024
f1052eb
cg_clif: Define build opts from FramePointer
workingjubilee May 4, 2024
dbf7018
Fix simd_gather documentation
betelgeuse Jun 24, 2024
8d11939
Sync from rust fda509e817abeeecb5b76bc1de844f355675c81e
bjorn3 Jun 26, 2024
476b7bd
Rustup to rustc 1.81.0-nightly (fda509e81 2024-06-25)
bjorn3 Jun 26, 2024
94c2e7a
Fix rustc test suite
bjorn3 Jun 26, 2024
c053e89
Remove the `box_pointers` lint.
nnethercote Jun 5, 2024
cc05efe
Introduce UnwindModule wrapper around a Module and UnwindContext
bjorn3 Jun 28, 2024
e97cebb
Use dyn Module instead of impl Module where possible
bjorn3 Jun 28, 2024
3d54358
Update object to 0.36.1
bjorn3 Jun 29, 2024
35f2093
small correction to fmt::Pointer impl
Sky9x Jun 28, 2024
30be8bc
Remove --cfg no_unstable_features
bjorn3 Jun 29, 2024
4560034
Stop pinning XCode 14
bjorn3 Jun 29, 2024
617de8c
coverage: Move span unexpansion into its own submodule
Zalathar Jun 30, 2024
ad575b0
Replace a magic boolean with enum `DeclareLetBindings`
Zalathar Jun 26, 2024
3b22589
Replace a magic boolean with enum `EmitStorageLive`
Zalathar Jun 26, 2024
ed07712
Replace a magic boolean with enum `ScheduleDrops`
Zalathar Jun 26, 2024
6c33149
coverage: Avoid getting extra unexpansion info when we don't need it
Zalathar Jun 30, 2024
4b516f5
Improve `run-make-support` library `args` API
GuillaumeGomez Jun 30, 2024
8a0e1ab
Add a regression test for #123630
pacak Jun 30, 2024
49cd5dd
Rustup to rustc 1.81.0-nightly (ba1d7f4a0 2024-06-29)
bjorn3 Jun 30, 2024
9ec6a02
Merge commit '49cd5dd454d0115cfbe9e39102a8b3ba4616aa40' into sync_cg_…
bjorn3 Jun 30, 2024
fb021c1
Rollup merge of #126018 - nnethercote:rm-box_pointers-lint, r=lcnr
matthiaskrgr Jun 30, 2024
3787ac9
Rollup merge of #126895 - betelgeuse:improve_simd_gather_documentatio…
matthiaskrgr Jun 30, 2024
e592e5c
Rollup merge of #126981 - Zalathar:enums, r=Nadrieril
matthiaskrgr Jun 30, 2024
5bb4229
Rollup merge of #127069 - Sky9x:fmt-pointer-use-addr, r=Nilstrieb
matthiaskrgr Jun 30, 2024
e9d04d2
Rollup merge of #127157 - Zalathar:unexpand, r=cjgillot
matthiaskrgr Jun 30, 2024
7207dd6
Rollup merge of #127160 - pacak:123630-test, r=Nadrieril
matthiaskrgr Jun 30, 2024
e5efa9f
Rollup merge of #127161 - GuillaumeGomez:improve-run-make-args, r=Kobzol
matthiaskrgr Jun 30, 2024
a0aa7ab
Rollup merge of #127162 - bjorn3:sync_cg_clif-2024-06-30, r=bjorn3
matthiaskrgr Jun 30, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ jobs:
if: matrix.os == 'macos-latest' && matrix.env.TARGET_TRIPLE == 'x86_64-apple-darwin'
run: rustup set default-host x86_64-apple-darwin

- name: Select XCode version
if: matrix.os == 'macos-latest'
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app

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

Expand Down
17 changes: 8 additions & 9 deletions compiler/rustc_codegen_cranelift/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ jobs:
env:
TARGET_TRIPLE: aarch64-unknown-linux-gnu
apt_deps: gcc-aarch64-linux-gnu qemu-user
- os: macos-latest
env:
TARGET_TRIPLE: aarch64-apple-darwin
- os: ubuntu-latest
env:
TARGET_TRIPLE: s390x-unknown-linux-gnu
Expand Down Expand Up @@ -108,10 +111,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y ${{ matrix.apt_deps }}

- name: Select XCode version
if: matrix.os == 'macos-latest'
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app

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

Expand Down Expand Up @@ -214,6 +213,9 @@ jobs:
- os: macos-latest
env:
TARGET_TRIPLE: x86_64-apple-darwin
- os: macos-latest
env:
TARGET_TRIPLE: aarch64-apple-darwin
# cross-compile from Linux to Windows using mingw
- os: ubuntu-latest
env:
Expand Down Expand Up @@ -248,10 +250,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64-x86-64

- name: Select XCode version
if: matrix.os == 'macos-latest'
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app

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

Expand Down Expand Up @@ -282,7 +280,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ github.ref == 'refs/heads/master' }}
needs: [rustfmt, test, bench, dist]
# FIXME add the bench job back to the dependency list once rust-lang/rust#125493 gets merged
needs: [rustfmt, test, dist]

permissions:
contents: write # for creating the dev tag and release
Expand Down
58 changes: 30 additions & 28 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79b27922a6879b5b5361d0a084cb0b1941bf109a98540addcb932da13b68bed4"
checksum = "0b6b33d7e757a887989eb18b35712b2a67d96171ec3149d1bfb657b29b7b367c"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "304c455b28bf56372729acb356afbb55d622f2b0f2f7837aa5e57c138acaac4d"
checksum = "b9acf15cb22be42d07c3b57d7856329cb228b7315d385346149df2566ad5e4aa"
dependencies = [
"bumpalo",
"cranelift-bforest",
Expand All @@ -70,45 +70,46 @@ dependencies = [
"hashbrown 0.14.3",
"log",
"regalloc2",
"rustc-hash",
"smallvec",
"target-lexicon",
]

[[package]]
name = "cranelift-codegen-meta"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1653c56b99591d07f67c5ca7f9f25888948af3f4b97186bff838d687d666f613"
checksum = "e934d301392b73b3f8b0540391fb82465a0f179a3cee7c726482ac4727efcc97"
dependencies = [
"cranelift-codegen-shared",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f5b6a9cf6b6eb820ee3f973a0db313c05dc12d370f37b4fe9630286e1672573f"
checksum = "8afb2a2566b3d54b854dfb288b3b187f6d3d17d6f762c92898207eba302931da"

[[package]]
name = "cranelift-control"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9d06e6bf30075fb6bed9e034ec046475093392eea1aff90eb5c44c4a033d19a"
checksum = "0100f33b704cdacd01ad66ff41f8c5030d57cbff078e2a4e49ab1822591299fa"
dependencies = [
"arbitrary",
]

[[package]]
name = "cranelift-entity"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29be04f931b73cdb9694874a295027471817f26f26d2f0ebe5454153176b6e3a"
checksum = "a8cfdc315e5d18997093e040a8d234bea1ac1e118a716d3e30f40d449e78207b"

[[package]]
name = "cranelift-frontend"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a07fd7393041d7faa2f37426f5dc7fc04003b70988810e8c063beefeff1cd8f9"
checksum = "0f74b84f16af2e982b0c0c72233503d9d55cbfe3865dbe807ca28dc6642a28b5"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -118,15 +119,15 @@ dependencies = [

[[package]]
name = "cranelift-isle"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f341d7938caa6dff8149dac05bb2b53fc680323826b83b4cf175ab9f5139a3c9"
checksum = "adf306d3dde705fb94bd48082f01d38c4ededc74293a4c007805f610bf08bc6e"

[[package]]
name = "cranelift-jit"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42733555e06433f1461570e09dbd756dafc228b4dac75c597cdbdc518de07522"
checksum = "f5c5cfb8bbd3339cd25cca30e7516ff8fe5cb1feeddde6980cc4d5ef34df97bb"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -144,9 +145,9 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "84950af02bb85f3da764d53a953b43bb29a732e793d4fe24637a61591be9a024"
checksum = "7c9b0d4269b36fd858e6d8f20cd4938941186fb831488c361888cb2d6b33a9a6"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -155,9 +156,9 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82af6066e6448d26eeabb7aa26a43f7ff79f8217b06bade4ee6ef230aecc8880"
checksum = "1ea0ebdef7aff4a79bcbc8b6495f31315f16b3bf311152f472eaa8d679352581"
dependencies = [
"cranelift-codegen",
"libc",
Expand All @@ -166,9 +167,9 @@ dependencies = [

[[package]]
name = "cranelift-object"
version = "0.107.0"
version = "0.109.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00af56107039ed150391df6f753298c7b08f2b6a2e0727d216b5fa599d684d8b"
checksum = "19e33439ec20db058bc7cc3410f9748ab1ad90a35cef713d625c736f43e3820d"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand Down Expand Up @@ -278,9 +279,9 @@ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"

[[package]]
name = "object"
version = "0.33.0"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d"
checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce"
dependencies = [
"crc32fast",
"hashbrown 0.14.3",
Expand Down Expand Up @@ -410,10 +411,11 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"

[[package]]
name = "wasmtime-jit-icache-coherence"
version = "20.0.0"
version = "22.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a9f93a3289057b26dc75eb84d6e60d7694f7d169c7c09597495de6e016a13ff"
checksum = "5afe2f0499542f9a4bcfa1b55bfdda803b6ade4e7c93c6b99e0f39dba44b0a91"
dependencies = [
"anyhow",
"cfg-if",
"libc",
"windows-sys",
Expand Down
14 changes: 7 additions & 7 deletions compiler/rustc_codegen_cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.107.0", default-features = false, features = ["std", "unwind", "all-arch"] }
cranelift-frontend = { version = "0.107.0" }
cranelift-module = { version = "0.107.0" }
cranelift-native = { version = "0.107.0" }
cranelift-jit = { version = "0.107.0", optional = true }
cranelift-object = { version = "0.107.0" }
cranelift-codegen = { version = "0.109.0", default-features = false, features = ["std", "unwind", "all-arch"] }
cranelift-frontend = { version = "0.109.0" }
cranelift-module = { version = "0.109.0" }
cranelift-native = { version = "0.109.0" }
cranelift-jit = { version = "0.109.0", optional = true }
cranelift-object = { version = "0.109.0" }
target-lexicon = "0.12.0"
gimli = { version = "0.28", default-features = false, features = ["write"]}
object = { version = "0.33", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
object = { version = "0.36", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

indexmap = "2.0.0"
libloading = { version = "0.8.0", optional = true }
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_codegen_cranelift/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
|FreeBSD|✅[^no-rustup]|❓|❓|❓|
|AIX|❌[^xcoff]|N/A|N/A|❌[^xcoff]|
|Other unixes|❓|❓|❓|❓|
|macOS|✅|❌[^apple-silicon]|N/A|N/A|
|macOS|✅|✅[^no-rustup]|N/A|N/A|
|Windows|✅[^no-rustup]|❌|N/A|N/A|

✅: Fully supported and tested
Expand All @@ -80,7 +80,6 @@ For more docs on how to build and test see [build_system/usage.txt](build_system
Not all targets are available as rustup component for nightly. See notes in the platform support matrix.

[^xcoff]: XCOFF object file format is not supported.
[^apple-silicon]: Tracked in [#1248](https://github.com/rust-lang/rustc_codegen_cranelift/issues/1248).
[^no-rustup]: Not available as rustup component for nightly. You can build it yourself.

## Usage
Expand Down
35 changes: 0 additions & 35 deletions compiler/rustc_codegen_cranelift/build_system/build_sysroot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,6 @@ fn build_clif_sysroot_for_triple(
prefix.to_str().unwrap()
));
}
rustflags.push("-Zunstable-options".to_owned());
for (name, values) in EXTRA_CHECK_CFGS {
rustflags.push(check_cfg_arg(name, *values));
}
compiler.rustflags.extend(rustflags);
let mut build_cmd = STANDARD_LIBRARY.build(&compiler, dirs);
if channel == "release" {
Expand Down Expand Up @@ -330,34 +326,3 @@ fn build_rtstartup(dirs: &Dirs, compiler: &Compiler) -> Option<SysrootTarget> {

Some(target_libs)
}

// Copied from https://github.com/rust-lang/rust/blob/4fd98a4b1b100f5329c6efae18031791f64372d2/src/bootstrap/src/utils/helpers.rs#L569-L585
/// Create a `--check-cfg` argument invocation for a given name
/// and it's values.
fn check_cfg_arg(name: &str, values: Option<&[&str]>) -> String {
// Creating a string of the values by concatenating each value:
// ',values("tvos","watchos")' or '' (nothing) when there are no values.
let next = match values {
Some(values) => {
let mut tmp = values.iter().flat_map(|val| [",", "\"", val, "\""]).collect::<String>();

tmp.insert_str(1, "values(");
tmp.push(')');
tmp
}
None => "".to_string(),
};
format!("--check-cfg=cfg({name}{next})")
}

const EXTRA_CHECK_CFGS: &[(&str, Option<&[&str]>)] = &[
("bootstrap", None),
("stdarch_intel_sde", None),
("no_fp_fmt_parse", None),
("no_global_oom_handling", None),
("no_rc", None),
("no_sync", None),
("netbsd10", None),
("backtrace_in_libstd", None),
("target_arch", Some(&["xtensa"])),
];
36 changes: 4 additions & 32 deletions compiler/rustc_codegen_cranelift/build_system/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ pub(crate) fn run_tests(
struct TestRunner<'a> {
is_native: bool,
jit_supported: bool,
use_unstable_features: bool,
skip_tests: &'a [&'a str],
dirs: Dirs,
target_compiler: Compiler,
Expand Down Expand Up @@ -361,15 +360,7 @@ impl<'a> TestRunner<'a> {
&& target_compiler.triple.contains("x86_64")
&& !target_compiler.triple.contains("windows");

Self {
is_native,
jit_supported,
use_unstable_features,
skip_tests,
dirs,
target_compiler,
stdlib_source,
}
Self { is_native, jit_supported, skip_tests, dirs, target_compiler, stdlib_source }
}

fn run_testsuite(&self, tests: &[TestCase]) {
Expand All @@ -393,31 +384,13 @@ impl<'a> TestRunner<'a> {
match *cmd {
TestCaseCmd::Custom { func } => func(self),
TestCaseCmd::BuildLib { source, crate_types } => {
if self.use_unstable_features {
self.run_rustc([source, "--crate-type", crate_types]);
} else {
self.run_rustc([
source,
"--crate-type",
crate_types,
"--cfg",
"no_unstable_features",
]);
}
self.run_rustc([source, "--crate-type", crate_types]);
}
TestCaseCmd::BuildBin { source } => {
if self.use_unstable_features {
self.run_rustc([source]);
} else {
self.run_rustc([source, "--cfg", "no_unstable_features"]);
}
self.run_rustc([source]);
}
TestCaseCmd::BuildBinAndRun { source, args } => {
if self.use_unstable_features {
self.run_rustc([source]);
} else {
self.run_rustc([source, "--cfg", "no_unstable_features"]);
}
self.run_rustc([source]);
self.run_out_command(
source.split('/').last().unwrap().split('.').next().unwrap(),
args,
Expand Down Expand Up @@ -472,7 +445,6 @@ impl<'a> TestRunner<'a> {
cmd.arg(&self.target_compiler.triple);
cmd.arg("-Cpanic=abort");
cmd.arg("-Zunstable-options");
cmd.arg("--check-cfg=cfg(no_unstable_features)");
cmd.arg("--check-cfg=cfg(jit)");
cmd.args(args);
cmd
Expand Down
Loading
Loading