compiletest: rename add-core-stubs to add-minicore

This commit is contained in:
Ralf Jung 2025-10-30 17:24:55 +01:00
parent 6a884ad1b5
commit 3796f7de57
276 changed files with 305 additions and 308 deletions

View file

@ -14,21 +14,21 @@ range of tests.
</div>
A test can use [`minicore`] by specifying the `//@ add-core-stubs` directive.
Then, mark the test with `#![feature(no_core)]` + `#![no_std]` + `#![no_core]`.
Due to Edition 2015 extern prelude rules, you will probably need to declare
`minicore` as an extern crate.
A test can use [`minicore`] by specifying the `//@ add-minicore` directive.
Then, mark the test with `#![feature(no_core)]` + `#![no_std]` + `#![no_core]`,
and import the crate into the test with `extern crate minicore` (edition 2015)
or `use minicore` (edition 2018+).
## Implied compiler flags
Due to the `no_std` + `no_core` nature of these tests, `//@ add-core-stubs`
Due to the `no_std` + `no_core` nature of these tests, `//@ add-minicore`
implies and requires that the test will be built with `-C panic=abort`.
**Unwinding panics are not supported.**
Tests will also be built with `-C force-unwind-tables=yes` to preserve CFI
directives in assembly tests.
TL;DR: `//@ add-core-stubs` implies two compiler flags:
TL;DR: `//@ add-minicore` implies two compiler flags:
1. `-C panic=abort`
2. `-C force-unwind-tables=yes`
@ -48,7 +48,7 @@ attributes (e.g. `on_unimplemented`) should be replicated exactly in `minicore`.
## Example codegen test that uses `minicore`
```rust,no_run
//@ add-core-stubs
//@ add-minicore
//@ revisions: meow bark
//@[meow] compile-flags: --target=x86_64-unknown-linux-gnu
//@[meow] needs-llvm-components: x86

View file

@ -200,7 +200,7 @@ pub(crate) struct TestProps {
pub no_auto_check_cfg: bool,
/// Build and use `minicore` as `core` stub for `no_core` tests in cross-compilation scenarios
/// that don't otherwise want/need `-Z build-std`.
pub add_core_stubs: bool,
pub add_minicore: bool,
/// Add these flags to the build of `minicore`.
pub core_stubs_compile_flags: Vec<String>,
/// Whether line annotatins are required for the given error kind.
@ -254,7 +254,7 @@ mod directives {
pub const LLVM_COV_FLAGS: &'static str = "llvm-cov-flags";
pub const FILECHECK_FLAGS: &'static str = "filecheck-flags";
pub const NO_AUTO_CHECK_CFG: &'static str = "no-auto-check-cfg";
pub const ADD_CORE_STUBS: &'static str = "add-core-stubs";
pub const ADD_MINICORE: &'static str = "add-minicore";
pub const CORE_STUBS_COMPILE_FLAGS: &'static str = "core-stubs-compile-flags";
pub const DISABLE_GDB_PRETTY_PRINTERS: &'static str = "disable-gdb-pretty-printers";
pub const COMPARE_OUTPUT_BY_LINES: &'static str = "compare-output-by-lines";
@ -311,7 +311,7 @@ impl TestProps {
llvm_cov_flags: vec![],
filecheck_flags: vec![],
no_auto_check_cfg: false,
add_core_stubs: false,
add_minicore: false,
core_stubs_compile_flags: vec![],
dont_require_annotations: Default::default(),
disable_gdb_pretty_printers: false,
@ -601,7 +601,7 @@ impl TestProps {
config.set_name_directive(ln, NO_AUTO_CHECK_CFG, &mut self.no_auto_check_cfg);
self.update_add_core_stubs(ln, config);
self.update_add_minicore(ln, config);
if let Some(flags) =
config.parse_name_value_directive(ln, CORE_STUBS_COMPILE_FLAGS)
@ -753,12 +753,12 @@ impl TestProps {
self.pass_mode
}
fn update_add_core_stubs(&mut self, ln: &DirectiveLine<'_>, config: &Config) {
let add_core_stubs = config.parse_name_directive(ln, directives::ADD_CORE_STUBS);
if add_core_stubs {
fn update_add_minicore(&mut self, ln: &DirectiveLine<'_>, config: &Config) {
let add_minicore = config.parse_name_directive(ln, directives::ADD_MINICORE);
if add_minicore {
if !matches!(config.mode, TestMode::Ui | TestMode::Codegen | TestMode::Assembly) {
panic!(
"`add-core-stubs` is currently only supported for ui, codegen and assembly test modes"
"`add-minicore` is currently only supported for ui, codegen and assembly test modes"
);
}
@ -767,10 +767,10 @@ impl TestProps {
if self.local_pass_mode().is_some_and(|pm| pm == PassMode::Run) {
// `minicore` can only be used with non-run modes, because it's `core` prelude stubs
// and can't run.
panic!("`add-core-stubs` cannot be used to run the test binary");
panic!("`add-minicore` cannot be used to run the test binary");
}
self.add_core_stubs = add_core_stubs;
self.add_minicore = add_minicore;
}
}
}

View file

@ -3,7 +3,7 @@
/// a best-effort approximation for diagnostics. Add new directives to this list when needed.
pub(crate) const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
// tidy-alphabetical-start
"add-core-stubs",
"add-minicore",
"assembly-output",
"aux-bin",
"aux-build",

View file

@ -1307,7 +1307,7 @@ impl<'test> TestCx<'test> {
/// `root_testpaths` refers to the path of the original test. the auxiliary and the test with an
/// aux-build have the same `root_testpaths`.
fn compose_and_run_compiler(&self, mut rustc: Command, input: Option<String>) -> ProcRes {
if self.props.add_core_stubs {
if self.props.add_minicore {
let minicore_path = self.build_minicore();
rustc.arg("--extern");
rustc.arg(&format!("minicore={}", minicore_path));
@ -1449,7 +1449,7 @@ impl<'test> TestCx<'test> {
aux_rustc.arg("-L").arg(&aux_dir);
if aux_props.add_core_stubs {
if aux_props.add_minicore {
let minicore_path = self.build_minicore();
aux_rustc.arg("--extern");
aux_rustc.arg(&format!("minicore={}", minicore_path));
@ -1891,7 +1891,7 @@ impl<'test> TestCx<'test> {
// change the default.
//
// `minicore` requires `#![no_std]` and `#![no_core]`, which means no unwinding panics.
if self.props.add_core_stubs {
if self.props.add_minicore {
rustc.arg("-Cpanic=abort");
rustc.arg("-Cforce-unwind-tables=yes");
}

View file

@ -1,6 +1,6 @@
// Test that PAC instructions are emitted when branch-protection is specified.
//@ add-core-stubs
//@ add-minicore
//@ revisions: GCS PACRET PAUTHLR_NOP PAUTHLR
//@ assembly-output: emit-asm
//@ needs-llvm-components: aarch64

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target aarch64-unknown-linux-gnu
//@ needs-llvm-components: aarch64

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3 -C panic=abort
//@ compile-flags: --target aarch64-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: aarch64 arm64ec
//@ assembly-output: emit-asm
//@ [aarch64] compile-flags: --target aarch64-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3 -C panic=abort
//@ compile-flags: --target armv7-unknown-linux-gnueabihf

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: base d32 neon
//@ assembly-output: emit-asm
//@ compile-flags: --target armv7-unknown-linux-gnueabihf

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target avr-none -C target-cpu=atmega328p
//@ needs-llvm-components: avr

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target avr-none -C target-cpu=atmega328p
//@ needs-llvm-components: avr

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target bpfel-unknown-none -C target_feature=+alu32
//@ needs-llvm-components: bpf

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target hexagon-unknown-linux-musl
//@ compile-flags: -Zmerge-functions=disabled

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: loongarch32 loongarch64
//@ assembly-output: emit-asm

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target m68k-unknown-linux-gnu
//@ needs-llvm-components: m68k

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: mips32 mips64
//@ assembly-output: emit-asm
//@[mips32] compile-flags: --target mips-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target msp430-none-elf
//@ needs-llvm-components: msp430

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target nvptx64-nvidia-cuda
//@ needs-llvm-components: nvptx

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: powerpc powerpc_altivec powerpc_vsx powerpc64 powerpc64_vsx
//@ assembly-output: emit-asm
//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: riscv64 riscv32 riscv64-zfhmin riscv32-zfhmin riscv64-zfh riscv32-zfh
//@ assembly-output: emit-asm

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: s390x s390x_vector
//@ assembly-output: emit-asm
//@[s390x] compile-flags: --target s390x-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: sparc sparcv8plus sparc64
//@ assembly-output: emit-asm
//@[sparc] compile-flags: --target sparc-unknown-none-elf

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target wasm32-unknown-unknown
//@ needs-llvm-components: webassembly

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86_64 i686
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3 -C panic=abort

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86_64 i686
//@ assembly-output: emit-asm
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: hard soft
//@ assembly-output: emit-asm
//@ [hard] compile-flags: --target thumbv8m.main-none-eabihf --crate-type lib -Copt-level=1

View file

@ -1,5 +1,5 @@
//! `compiletest` self-test to check that `add-core-stubs` is incompatible with run pass modes.
//! `compiletest` self-test to check that `add-minicore` is incompatible with run pass modes.
//@ add-core-stubs
//@ add-minicore
//@ run-pass
//@ should-fail

View file

@ -1,6 +1,6 @@
// Makes sure that `-C dwarf-version=4` causes `rustc` to emit DWARF version 4.
//@ assembly-output: emit-asm
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -g --target x86_64-unknown-linux-gnu -C dwarf-version=4 -Copt-level=0
//@ needs-llvm-components: x86

View file

@ -1,5 +1,5 @@
// Makes sure that `-C dwarf-version=5` causes `rustc` to emit DWARF version 5.
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: -g --target x86_64-unknown-linux-gnu -C dwarf-version=5 -Copt-level=0
//@ needs-llvm-components: x86

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3 --target loongarch64-unknown-linux-gnu
//@ needs-llvm-components: loongarch

View file

@ -1,5 +1,5 @@
//@ revisions: elfv1-be aix
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//
//@[elfv1-be] compile-flags: --target powerpc64-unknown-linux-gnu

View file

@ -1,5 +1,5 @@
//@ revisions: wasm32-unknown wasm64-unknown wasm32-wasip1
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ [wasm32-unknown] compile-flags: --target wasm32-unknown-unknown
//@ [wasm64-unknown] compile-flags: --target wasm64-unknown-unknown

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x64
//@ assembly-output: emit-asm
//@ [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=pic

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x64
//@ assembly-output: emit-asm
//@ [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=pie

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: elfv1-be elfv2-be elfv2-le aix
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3

View file

@ -5,7 +5,7 @@
//! `-Zreg-struct-return` is activated
//! * Caller side, verifying callers do receive returned structs in registers when
//! `-Zreg-struct-return` is activated
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: -O --target=i686-unknown-linux-gnu -Crelocation-model=static
//@ revisions: WITH WITHOUT

View file

@ -1,6 +1,6 @@
// Test the regparm ABI with builtin and non-builtin calls
// Issue: https://github.com/rust-lang/rust/issues/145271
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: -O --target=i686-unknown-linux-gnu -Crelocation-model=static
//@ revisions: REGPARM1 REGPARM2 REGPARM3

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3 --target riscv64gc-unknown-linux-gnu
//@ needs-llvm-components: riscv

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target riscv64imac-unknown-none-elf -Ctarget-feature=+f,+d
//@ needs-llvm-components: riscv

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: enable-backchain disable-backchain default-backchain
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3 --crate-type=lib --target=s390x-unknown-linux-gnu

View file

@ -1,5 +1,5 @@
//@ revisions: z10 z10_vector z13 z13_no_vector
//@ add-core-stubs
//@ add-minicore
// ignore-tidy-linelength
//@ assembly-output: emit-asm
//@ compile-flags: -Copt-level=3 -Z merge-functions=disabled

View file

@ -1,6 +1,6 @@
// Verifies that KCFI arity indicator is emitted.
//
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86_64
//@ assembly-output: emit-asm
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -Cllvm-args=-x86-asm-syntax=intel -Ctarget-feature=-crt-static -Cpanic=abort -Zsanitizer=kcfi -Zsanitizer-kcfi-arity -Copt-level=0

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86 x86-avx2 x86-avx512 aarch64
//@ [x86] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ [x86] needs-llvm-components: x86

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86-avx512
//@ [x86-avx512] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86-avx2 x86-avx512
//@ [x86-avx2] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ [x86-avx2] compile-flags: -C target-feature=+avx2

View file

@ -1,5 +1,5 @@
// verify that simd mask reductions do not introduce additional bit shift operations
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86 aarch64
//@ [x86] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
// Set the base cpu explicitly, in case the default has been changed.

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86-avx2 x86-avx512
//@ [x86-avx2] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ [x86-avx2] compile-flags: -C target-feature=+avx2

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86-avx512
//@ [x86-avx512] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ [x86-avx512] compile-flags: -C target-feature=+avx512f,+avx512vl,+avx512bw,+avx512dq

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86-avx2 x86-avx512 aarch64
//@ [x86-avx2] compile-flags: --target=x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel
//@ [x86-avx2] compile-flags: -C target-feature=+avx2

View file

@ -2,7 +2,7 @@
// - float structure members are passes in floating point registers
// (#86163)
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ needs-llvm-components: sparc
//@ compile-flags: --target=sparcv9-sun-solaris -Copt-level=3

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x86_64 i686 aarch64
//@ assembly-output: emit-asm
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -C llvm-args=-x86-asm-syntax=intel

View file

@ -1,7 +1,7 @@
// Test that stack smash protection code is emitted for all tier1 and tier2
// targets, with the exception of nvptx64-nvidia-cuda
//
//@ add-core-stubs
//@ add-minicore
//@ revisions: r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23
//@ revisions: r24 r25 r26 r27 r28 r29 r30 r31 r32 r33 r36 r37 r38 r39 r40 r41 r42 r43 r44
//@ revisions: r45 r46 r47 r48 r49 r50 r51 r52 r53 r54 r55 r56 r57 r58 r59 r60 r61 r62 r63 r64 r65

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: x64 A64 ppc64le
//@ assembly-output: emit-asm
//@ [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=static

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ needs-llvm-components: x86
//@ revisions: TWOFLAGS SINGLEFLAG

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
// ignore-tidy-linelength
//@ revisions: amdgcn_amd_amdhsa

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
// ignore-tidy-linelength
//@ revisions: aarch64_be_unknown_hermit

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
// ignore-tidy-linelength
//@ revisions: aarch64_apple_darwin

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
// ignore-tidy-linelength
//@ revisions: nvptx64_nvidia_cuda

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
// ignore-tidy-linelength
//@ revisions: aarch64_pc_windows_msvc

View file

@ -7,7 +7,7 @@
//@ compile-flags: -Copt-level=2
//@ filecheck-flags: --implicit-check-not fld --implicit-check-not fst
//@ revisions: linux win
//@ add-core-stubs
//@ add-minicore
//@[linux] needs-llvm-components: x86
//@[win] needs-llvm-components: x86
//@[linux] compile-flags: --target i686-unknown-linux-gnu

View file

@ -1,6 +1,6 @@
// Test LVI load hardening on SGX enclave code, specifically that `ret` is rewritten.
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target x86_64-fortanix-unknown-sgx -Copt-level=0
//@ needs-llvm-components: x86

View file

@ -1,6 +1,6 @@
// Test LVI ret hardening on generic rust code
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target x86_64-fortanix-unknown-sgx
//@ needs-llvm-components: x86

View file

@ -1,6 +1,6 @@
// Test LVI load hardening on SGX inline assembly code
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target x86_64-fortanix-unknown-sgx
//@ needs-llvm-components: x86

View file

@ -2,7 +2,7 @@
//@ compile-flags: -Copt-level=3
//@ compile-flags: --target x86_64-pc-windows-msvc
//@ needs-llvm-components: x86
//@ add-core-stubs
//@ add-minicore
#![feature(f16, f128)]
#![feature(no_core)]

View file

@ -1,5 +1,5 @@
//@ assembly-output: emit-asm
//@ add-core-stubs
//@ add-minicore
//@ revisions: msvc softfloat
//@ compile-flags: -Copt-level=3
//@[msvc] compile-flags: --target x86_64-pc-windows-msvc

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: --target aarch64-unknown-none-softfloat -Zmerge-functions=disabled
//@ needs-llvm-components: aarch64
#![crate_type = "lib"]

View file

@ -1,6 +1,6 @@
// Test that structs aligned to 128 bits are passed with the correct ABI on aarch64.
//@ add-core-stubs
//@ add-minicore
//@ revisions: linux darwin win
//@[linux] compile-flags: --target aarch64-unknown-linux-gnu
//@[darwin] compile-flags: --target aarch64-apple-darwin

View file

@ -1,6 +1,6 @@
// Checks if the correct annotation for the efiapi ABI is passed to llvm.
//@ add-core-stubs
//@ add-minicore
//@ revisions:x86_64 i686 aarch64 arm riscv
//@[x86_64] compile-flags: --target x86_64-unknown-uefi
//@[x86_64] needs-llvm-components: x86

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -Copt-level=3
//@ revisions:x86_64 i686 aarch64-apple aarch64-windows aarch64-linux arm riscv

View file

@ -2,7 +2,7 @@
// llvm. Also checks that the abi-sysv64 feature gate allows usage
// of the sysv64 abi.
//
//@ add-core-stubs
//@ add-minicore
//@ needs-llvm-components: x86
//@ compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0

View file

@ -1,6 +1,5 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -Z merge-functions=disabled
//@ add-core-stubs
//@ revisions: windows-gnu
//@[windows-gnu] compile-flags: --target x86_64-pc-windows-gnu

View file

@ -2,7 +2,7 @@
// llvm. Also checks that the abi_x86_interrupt feature gate allows usage
// of the x86-interrupt abi.
//@ add-core-stubs
//@ add-minicore
//@ needs-llvm-components: x86
//@ compile-flags: -C no-prepopulate-passes --target=x86_64-unknown-linux-gnu -Copt-level=0

View file

@ -1,5 +1,5 @@
// ignore-tidy-linelength
//@ add-core-stubs
//@ add-minicore
//@ revisions:i686-linux x86_64-linux
//@ compile-flags: -Cno-prepopulate-passes -Copt-level=1 -Cpanic=abort

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions:x86-linux x86-darwin
//@[x86-linux] compile-flags: --target i686-unknown-linux-gnu

View file

@ -1,5 +1,5 @@
// ignore-tidy-linelength
//@ add-core-stubs
//@ add-minicore
//@ revisions:m68k x86_64-linux x86_64-windows i686-linux i686-windows
//@[m68k] compile-flags: --target m68k-unknown-linux-gnu

View file

@ -2,7 +2,7 @@
//@ compile-flags: --crate-type=rlib --target=amdgcn-amd-amdhsa -Ctarget-cpu=gfx900
//@ needs-llvm-components: amdgpu
//@ add-core-stubs
//@ add-minicore
#![feature(no_core)]
#![no_core]

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: aarch64 aarch64_fixed_x18 aarch64_no_x18 aarch64_reserve_x18 arm64ec
//@[aarch64] compile-flags: --target aarch64-unknown-linux-gnu
//@[aarch64] needs-llvm-components: aarch64

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target avr-none -C target-cpu=atmega328p
//@ needs-llvm-components: avr

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: --target bpfel-unknown-none
//@ needs-llvm-components: bpf

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: --target csky-unknown-linux-gnuabiv2
//@ needs-llvm-components: csky

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: hexagon
//@[hexagon] compile-flags: --target hexagon-unknown-linux-musl
//@[hexagon] needs-llvm-components: hexagon

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ compile-flags: --target msp430-none-elf
//@ needs-llvm-components: msp430

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: powerpc powerpc64 powerpc64le aix64
//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
//@[powerpc] needs-llvm-components: powerpc

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -Copt-level=3 --target x86_64-unknown-linux-gnu
//@ needs-llvm-components: x86

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ assembly-output: emit-asm
//@ revisions: rv32i rv64i rv32e
//@[rv32i] compile-flags: --target riscv32i-unknown-none-elf

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: s390x
//@[s390x] compile-flags: --target s390x-unknown-linux-gnu -C target-cpu=z10
//@[s390x] needs-llvm-components: systemz

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
// FIXME(nagisa): remove the flags below once all targets support `asm!`.
//@ compile-flags: --target x86_64-unknown-linux-gnu -Copt-level=0
//@ needs-llvm-components: x86

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: sparc sparcv8plus sparc64
//@[sparc] compile-flags: --target sparc-unknown-none-elf
//@[sparc] needs-llvm-components: sparc

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -Copt-level=3 --target=avr-none -C target-cpu=atmega328p --crate-type=rlib -C panic=abort
//@ needs-llvm-components: avr

View file

@ -1,6 +1,6 @@
// Test that the correct module flags are emitted with different branch protection flags.
//@ add-core-stubs
//@ add-minicore
//@ revisions: BTI GCS PACRET LEAF BKEY PAUTHLR PAUTHLR_BKEY PAUTHLR_LEAF PAUTHLR_BTI NONE
//@ needs-llvm-components: aarch64
//@ [BTI] compile-flags: -Z branch-protection=bti

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -Copt-level=3
#![feature(c_variadic)]
#![crate_type = "lib"]

View file

@ -1,7 +1,7 @@
// Test that temporary allocas used for call arguments have their lifetimes described by
// intrinsics.
//
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -Copt-level=1 -Cno-prepopulate-passes --crate-type=lib --target i686-unknown-linux-gnu
//@ needs-llvm-components: x86
#![feature(no_core)]

View file

@ -1,5 +1,5 @@
// ignore-tidy-linelength
//@ add-core-stubs
//@ add-minicore
//@ revisions:aarch64 loongarch64 powerpc64 sparc64 x86_64
//@ compile-flags: -Copt-level=3 -Cno-prepopulate-passes -Zlint-llvm-ir

View file

@ -1,6 +1,6 @@
// Test that the correct module flags are emitted with different control-flow protection flags.
//@ add-core-stubs
//@ add-minicore
//@ revisions: undefined none branch return full
//@ needs-llvm-components: x86
// [undefined] no extra compile-flags

View file

@ -1,5 +1,5 @@
//! Test calling variadic functions with various ABIs.
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: -Z merge-functions=disabled
//@ revisions: x86_32 x86_32_win x86_64 aarch64 arm32
//@[x86_64] compile-flags: --target x86_64-unknown-linux-gnu

View file

@ -1,4 +1,4 @@
//@ add-core-stubs
//@ add-minicore
//@ revisions: linux apple
//@ compile-flags: -Copt-level=0 -Cno-prepopulate-passes -Zlint-llvm-ir

View file

@ -1,6 +1,6 @@
//! Basic smoke test for `minicore` test auxiliary.
//@ add-core-stubs
//@ add-minicore
//@ compile-flags: --target=x86_64-unknown-linux-gnu
//@ needs-llvm-components: x86

View file

@ -1,6 +1,6 @@
// Test that we don't generate Objective-C definitions or image info unnecessarily.
//@ add-core-stubs
//@ add-minicore
//@ revisions: i686_apple_darwin
//@ [i686_apple_darwin] compile-flags: --target i686-apple-darwin
//@ [i686_apple_darwin] needs-llvm-components: x86

View file

@ -1,5 +1,5 @@
// ignore-tidy-linelength
//@ add-core-stubs
//@ add-minicore
//@ revisions: i686_apple_darwin
//@ [i686_apple_darwin] compile-flags: --target i686-apple-darwin
//@ [i686_apple_darwin] needs-llvm-components: x86

Some files were not shown because too many files have changed in this diff Show more