From 84d6e8aed3af940c53e49e342575e91f502c7bd4 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 6 Jul 2021 20:54:54 -0700 Subject: Implement cfg(target_abi) (RFC 2992) Add an `abi` field to `TargetOptions`, defaulting to "". Support using `cfg(target_abi = "...")` for conditional compilation on that field. Gated by `feature(cfg_target_abi)`. Add a test for `target_abi`, and a test for the feature gate. Add `target_abi` to tidy as a platform-specific cfg. This does not add an abi to any existing target. --- compiler/rustc_feature/src/active.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/rustc_feature/src/active.rs') diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index f045a75cdc8..03f06466683 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -687,6 +687,9 @@ declare_features! ( /// Allows qualified paths in struct expressions, struct patterns and tuple struct patterns. (active, more_qualified_paths, "1.54.0", Some(80080), None), + /// Allows `cfg(target_abi = "...")`. + (active, cfg_target_abi, "1.55.0", Some(80970), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- -- cgit 1.4.1-3-g733a5