Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_llvm/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ fn packed_stack_attr<'ll>(
return None;
}

// The backchain and softfloat flags can be set via -Ctarget-features=...
// The backchain and softfloat flags can be set via -Ctarget-feature=...
// or via #[target_features(enable = ...)] so we have to check both possibilities
let have_backchain = sess.unstable_target_features.contains(&sym::backchain)
let have_backchain = sess.target_features.contains(&sym::backchain)
|| function_attributes.iter().any(|feature| feature.name == sym::backchain);
let have_softfloat = sess.unstable_target_features.contains(&sym::soft_float)
|| function_attributes.iter().any(|feature| feature.name == sym::soft_float);
Expand Down
3 changes: 1 addition & 2 deletions compiler/rustc_target/src/target_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,8 +904,7 @@ static LOONGARCH_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
#[rustfmt::skip]
const IBMZ_FEATURES: &[(&str, Stability, ImpliedFeatures)] = &[
// tidy-alphabetical-start
// For "backchain", https://github.com/rust-lang/rust/issues/142412 is a stabilization blocker
("backchain", Unstable(sym::s390x_target_feature), &[]),
("backchain", Stable, &[]),
("concurrent-functions", Unstable(sym::s390x_target_feature), &[]),
("deflate-conversion", Unstable(sym::s390x_target_feature), &[]),
("enhanced-sort", Unstable(sym::s390x_target_feature), &[]),
Expand Down
1 change: 0 additions & 1 deletion tests/codegen-llvm/packedstack.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ add-minicore
//@ compile-flags: -Copt-level=3 --crate-type=lib --target=s390x-unknown-none-softfloat -Zpacked-stack
//@ needs-llvm-components: systemz
#![feature(s390x_target_feature)]
#![crate_type = "lib"]
#![feature(no_core, lang_items)]
#![no_core]
Expand Down

This file was deleted.

10 changes: 3 additions & 7 deletions tests/ui/target-feature/packedstack-combinations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,17 @@
//@ [with_softfloat] build-pass
//@ [with_softfloat] needs-llvm-components: systemz

#![feature(s390x_target_feature)]
#![crate_type = "rlib"]
#![feature(no_core,lang_items)]
#![feature(no_core, lang_items)]
#![no_core]

extern crate minicore;
use minicore::*;

#[no_mangle]
#[cfg_attr(backchain_attr,target_feature(enable = "backchain"))]
pub fn test() {
}
#[cfg_attr(backchain_attr, target_feature(enable = "backchain"))]
pub fn test() {}

//[wrong_arch]~? ERROR `-Zpacked-stack` is only supported on s390x
//[backchain_cli]~? WARN unstable feature specified for `-Ctarget-feature`: `backchain`
//[backchain_cli]~? ERROR `-Zpacked-stack` is incompatible with `backchain` target feature
//[backchain_attr]~? ERROR `-Zpacked-stack` is incompatible with `backchain` target feature
//[with_softfloat]~? WARN unstable feature specified for `-Ctarget-feature`: `backchain`

This file was deleted.

Loading