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_span/src/symbol.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler/rustc_span/src') diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index be4f12c6d1c..6d14662dc77 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -353,6 +353,7 @@ symbols! { cfg_eval, cfg_panic, cfg_sanitize, + cfg_target_abi, cfg_target_feature, cfg_target_has_atomic, cfg_target_thread_local, @@ -1199,6 +1200,7 @@ symbols! { sync, sync_trait, t32, + target_abi, target_arch, target_endian, target_env, -- cgit 1.4.1-3-g733a5