From 8d3a263c795e3c35f09bf3534af8b33c0c53b5d1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 16 Nov 2024 10:00:16 +0100 Subject: [PATCH] generalize 'forbidden feature' concept so that even (un)stable feature can be invalid to toggle Also rename some things for extra clarity --- src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 9f552b3feb950..75f5b32daaa3c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -175,7 +175,11 @@ impl CodegenBackend for CraneliftCodegenBackend { } } - fn target_features(&self, sess: &Session, _allow_unstable: bool) -> Vec { + fn target_features_cfg( + &self, + sess: &Session, + _allow_unstable: bool, + ) -> Vec { // FIXME return the actually used target features. this is necessary for #[cfg(target_feature)] if sess.target.arch == "x86_64" && sess.target.os != "none" { // x86_64 mandates SSE2 support