From 74b55b4b865a6ca882e9006bcf7b87f5eb845f4b Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Tue, 29 Apr 2025 22:15:11 +0800 Subject: [PATCH] Add comment to remind filtering unsupported features when adding new ones --- compiler/rustc_target/src/target_features.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs index 69c8b9119ab2..007bfea887c8 100644 --- a/compiler/rustc_target/src/target_features.rs +++ b/compiler/rustc_target/src/target_features.rs @@ -102,6 +102,9 @@ impl Stability { // check whether they're named already elsewhere in rust // e.g. in stdarch and whether the given name matches LLVM's // if it doesn't, to_llvm_feature in llvm_util in rustc_codegen_llvm needs to be adapted. +// Additionally, if the feature is not available in older version of LLVM supported by the current +// rust, the same function must be updated to filter out these features to avoid triggering +// warnings. // // Also note that all target features listed here must be purely additive: for target_feature 1.1 to // be sound, we can never allow features like `+soft-float` (on x86) to be controlled on a