Skip to content

Commit 493fe80

Browse files
committed
Re-Annotate the tests with needs-llvm-components
Doesn't work though, because compiletest doesn't process ignores on a per-revision manner.
1 parent a8e6a2c commit 493fe80

26 files changed

+61
-24
lines changed

src/test/assembly/asm/mips-types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// revisions: mips32 mips64
33
// assembly-output: emit-asm
44
//[mips32] compile-flags: --target mips-unknown-linux-gnu
5+
//[mips32] needs-llvm-components: mips
56
//[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64
6-
// needs-llvm-components: mips
7+
//[mips64] needs-llvm-components: mips
78

89
#![feature(no_core, lang_items, rustc_attrs, repr_simd)]
910
#![crate_type = "rlib"]

src/test/assembly/asm/powerpc-types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
// revisions: powerpc powerpc64
33
// assembly-output: emit-asm
44
//[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
5+
//[powerpc] needs-llvm-components: powerpc
56
//[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu
6-
// needs-llvm-components: powerpc
7+
//[powerpc64] needs-llvm-components: powerpc
78

89
#![feature(no_core, lang_items, rustc_attrs, repr_simd)]
910
#![crate_type = "rlib"]

src/test/assembly/asm/riscv-types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// revisions: riscv64 riscv32
33
// assembly-output: emit-asm
44
//[riscv64] compile-flags: --target riscv64imac-unknown-none-elf
5+
//[riscv64] needs-llvm-components: riscv
56
//[riscv32] compile-flags: --target riscv32imac-unknown-none-elf
7+
//[riscv32] needs-llvm-components: riscv
68
// compile-flags: -C target-feature=+d
7-
// needs-llvm-components: riscv
89
// min-system-llvm-version: 12.0
910

1011
#![feature(no_core, lang_items, rustc_attrs)]

src/test/assembly/asm/x86-modifiers.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// assembly-output: emit-asm
44
// compile-flags: -O
55
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
6+
//[x86_64] needs-llvm-components: x86
67
//[i686] compile-flags: --target i686-unknown-linux-gnu
8+
//[i686] needs-llvm-components: x86
79
// compile-flags: -C llvm-args=--x86-asm-syntax=intel
810
// compile-flags: -C target-feature=+avx512bw
911

src/test/assembly/asm/x86-types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
// revisions: x86_64 i686
33
// assembly-output: emit-asm
44
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
5+
//[x86_64] needs-llvm-components: x86
56
//[i686] compile-flags: --target i686-unknown-linux-gnu
7+
//[i686] needs-llvm-components: x86
68
// compile-flags: -C llvm-args=--x86-asm-syntax=intel
79
// compile-flags: -C target-feature=+avx512bw
810

src/test/assembly/static-relocation-model.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// min-llvm-version: 12.0.0
2-
// needs-llvm-components: aarch64 x86 powerpc
32
// revisions: x64 A64 ppc64le
43
// assembly-output: emit-asm
54
// [x64] compile-flags: --target x86_64-unknown-linux-gnu -Crelocation-model=static
5+
// [x64] needs-llvm-components: x86
66
// [A64] compile-flags: --target aarch64-unknown-linux-gnu -Crelocation-model=static
7+
// [A64] needs-llvm-components: aarch64
78
// [ppc64le] compile-flags: --target powerpc64le-unknown-linux-gnu -Crelocation-model=static
9+
// [ppc64le] needs-llvm-components: powerpc
810

911
#![feature(no_core, lang_items)]
1012
#![no_core]

src/test/codegen/abi-efiapi.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
// Checks if the correct annotation for the efiapi ABI is passed to llvm.
22

33
// revisions:x86_64 i686 aarch64 arm riscv
4-
// needs-llvm-components: aarch64 arm riscv
5-
64
//[x86_64] compile-flags: --target x86_64-unknown-uefi
5+
//[x86_64] needs-llvm-components: aarch64 arm riscv
76
//[i686] compile-flags: --target i686-unknown-linux-musl
7+
//[i686] needs-llvm-components: aarch64 arm riscv
88
//[aarch64] compile-flags: --target aarch64-unknown-none
9+
//[aarch64] needs-llvm-components: aarch64 arm riscv
910
//[arm] compile-flags: --target armv7r-none-eabi
11+
//[arm] needs-llvm-components: aarch64 arm riscv
1012
//[riscv] compile-flags: --target riscv64gc-unknown-none-elf
13+
//[riscv] needs-llvm-components: aarch64 arm riscv
1114
// compile-flags: -C no-prepopulate-passes
1215

1316
#![crate_type = "lib"]

src/test/codegen/asm-sanitize-llvm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
// FIXME(nagisa): remove the flags here once all targets support `asm!`.
1+
// FIXME(nagisa): remove the flags below once all targets support `asm!`.
22
// compile-flags: --target x86_64-unknown-linux-gnu
3+
// needs-llvm-components: x86
34

45
// Verify we sanitize the special tokens for the LLVM inline-assembly, ensuring people won't
56
// inadvertently rely on the LLVM-specific syntax and features.

src/test/codegen/default-requires-uwtable.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// revisions: WINDOWS ANDROID
2-
// needs-llvm-components: x86 arm
32
// compile-flags: -C panic=abort
43
// [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc
4+
// [WINDOWS] needs-llvm-components: x86
55
// [ANDROID] compile-flags: --target=armv7-linux-androideabi
6+
// [ANDROID] needs-llvm-components: arm
67

78
#![feature(no_core, lang_items)]
89
#![crate_type = "lib"]

src/test/codegen/i686-macosx-deployment-target.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See issue #60235.
44

55
// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
6+
// needs-llvm-components: x86
67
// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.9
78
#![feature(no_core, lang_items)]
89
#![no_core]

src/test/codegen/i686-no-macosx-deployment-target.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See issue #60235.
44

55
// compile-flags: -O --target=i686-apple-darwin --crate-type=rlib
6+
// needs-llvm-components: x86
67
// unset-rustc-env:MACOSX_DEPLOYMENT_TARGET
78
#![feature(no_core, lang_items)]
89
#![no_core]

src/test/codegen/sparc-struct-abi.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
//
21
// Checks that we correctly codegen extern "C" functions returning structs.
32
// See issue #52638.
43

5-
// only-sparc64
64
// compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
5+
// needs-llvm-components: sparc
76
#![feature(no_core, lang_items)]
87
#![no_core]
98

src/test/codegen/x86_64-macosx-deployment-target.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See issue #60235.
44

55
// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
6+
// needs-llvm-components: x86
67
// rustc-env:MACOSX_DEPLOYMENT_TARGET=10.9
78
#![feature(no_core, lang_items)]
89
#![no_core]

src/test/codegen/x86_64-no-macosx-deployment-target.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See issue #60235.
44

55
// compile-flags: -O --target=x86_64-apple-darwin --crate-type=rlib
6+
// needs-llvm-components: x86
67
// unset-rustc-env:MACOSX_DEPLOYMENT_TARGET
78
#![feature(no_core, lang_items)]
89
#![no_core]

src/test/ui/asm/inline-syntax.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
// needs-llvm-components: arm
21
// revisions: x86_64 arm
32
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
43
//[x86_64] check-pass
4+
//[x86_64] needs-llvm-components: x86
55
//[x86_64_allowed] compile-flags: --target x86_64-unknown-linux-gnu
66
//[x86_64_allowed] check-pass
7+
//[x86_64_allowed] needs-llvm-components: x86
78
//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf
89
//[arm] build-fail
10+
//[arm] needs-llvm-components: arm
911

1012
#![feature(no_core, lang_items, rustc_attrs)]
1113
#![crate_type = "rlib"]

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// build-pass
22
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
3-
// only-thumbv8m.main-none-eabi
3+
// needs-llvm-components: arm
44
#![feature(abi_c_cmse_nonsecure_call)]
55
#![no_std]
66

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
2-
// only-thumbv8m.main-none-eabi
3-
#![feature(abi_c_cmse_nonsecure_call)]
4-
#![no_std]
2+
// needs-llvm-components: arm
3+
// min-llvm-version: 11.0
4+
#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)]
5+
#![no_core]
6+
#[lang="sized"]
7+
pub trait Sized { }
8+
#[lang="copy"]
9+
pub trait Copy { }
10+
11+
extern "rust-intrinsic" {
12+
pub fn transmute<T, U>(e: T) -> U;
13+
}
514

615
#[no_mangle]
716
pub fn test(a: u32, b: u32, c: u32, d: u32, e: u32) -> u32 {

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
2-
// only-thumbv8m.main-none-eabi
2+
// needs-llvm-components: arm
33
#![feature(abi_c_cmse_nonsecure_call)]
44
#![no_std]
55

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
2-
// only-thumbv8m.main-none-eabi
2+
// needs-llvm-components: arm
33
#![feature(abi_c_cmse_nonsecure_call)]
44
#![no_std]
55

src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-registers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// build-pass
22
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
3-
// only-thumbv8m.main-none-eabi
3+
// needs-llvm-components: arm
44
#![feature(cmse_nonsecure_entry)]
55
#![no_std]
66

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
2-
// only-thumbv8m.main-none-eabi
3-
#![feature(cmse_nonsecure_entry)]
4-
#![no_std]
2+
// needs-llvm-components: arm
3+
// min-llvm-version: 11.0
4+
#![feature(cmse_nonsecure_entry, no_core, lang_items)]
5+
#![no_core]
6+
#[lang="sized"]
7+
trait Sized { }
8+
#[lang="copy"]
9+
trait Copy { }
510

611
#[no_mangle]
712
#[cmse_nonsecure_entry]
8-
pub extern "C" fn entry_function(a: u32, b: u32, c: u32, d: u32, e: u32) -> u32 { //~ ERROR
9-
a + b + c + d + e
13+
pub extern "C" fn entry_function(_: u32, _: u32, _: u32, _: u32, e: u32) -> u32 {
14+
e
1015
}

src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
2-
// only-thumbv8m.main-none-eabi
2+
// needs-llvm-components: arm
33
#![feature(cmse_nonsecure_entry)]
44
#![no_std]
55

src/test/ui/crate-loading/missing-std.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: --target x86_64-unknown-uefi
2+
// needs-llvm-components: x86
23
// rustc-env:CARGO=/usr/bin/cargo
34
// rustc-env:RUSTUP_HOME=/home/bors/.rustup
45
#![no_core]

src/test/ui/sanitize/crt-static.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -Z sanitizer=address -C target-feature=+crt-static --target x86_64-unknown-linux-gnu
2+
// needs-llvm-components: x86
23

34
#![feature(no_core)]
45
#![no_core]

src/test/ui/sanitize/incompatible.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -Z sanitizer=address -Z sanitizer=memory --target x86_64-unknown-linux-gnu
2+
// needs-llvm-components: x86
23
// error-pattern: error: `-Zsanitizer=address` is incompatible with `-Zsanitizer=memory`
34

45
#![feature(no_core)]

src/test/ui/sanitize/unsupported-target.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -Z sanitizer=leak --target i686-unknown-linux-gnu
2+
// needs-llvm-components: x86
23
// error-pattern: error: leak sanitizer is not supported for this target
34
#![feature(no_core)]
45
#![no_core]

0 commit comments

Comments
 (0)