Skip to content

Commit 471f077

Browse files
authored
Rollup merge of #136147 - RalfJung:required-target-features-check-not-add, r=workingjubilee
ABI-required target features: warn when they are missing in base CPU Part of rust-lang/rust#135408: instead of adding ABI-required features to the target we build for LLVM, check that they are already there. Crucially we check this after applying `-Ctarget-cpu` and `-Ctarget-feature`, by reading `sess.unstable_target_features`. This means we can tweak the ABI target feature check without changing the behavior for any existing user; they will get warnings but the target features behave as before. The test changes here show that we are un-doing the "add all required target features" part. Without the full #135408, there is no way to take a way an ABI-required target feature with `-Ctarget-cpu`, so we cannot yet test that part. Cc ``@workingjubilee``
2 parents c4539dc + c6aca22 commit 471f077

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/pass/shims/x86/intrinsics-x86-pause-without-sse2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// We're testing x86 target specific features
2-
//@only-target: x86_64 i686
1+
// We're testing x86-32 target specific features. SSE always exists on x86-64.
2+
//@only-target: i686
33
//@compile-flags: -C target-feature=-sse2
44

55
#[cfg(target_arch = "x86")]

0 commit comments

Comments
 (0)