diff options
| author | Luqman Aden <me@luqman.ca> | 2021-03-24 21:45:09 -0700 |
|---|---|---|
| committer | Luqman Aden <me@luqman.ca> | 2021-05-05 16:04:25 -0700 |
| commit | db555e1284dd37f4f3c76474aabfca09140a7ab3 (patch) | |
| tree | 6e6e96a1c43ac0c193e3ab756bcfe8d4747c904c /compiler/rustc_feature/src/active.rs | |
| parent | bacf770f2983a52f31e3537db5f0fe1ef2eaa874 (diff) | |
| download | rust-db555e1284dd37f4f3c76474aabfca09140a7ab3.tar.gz rust-db555e1284dd37f4f3c76474aabfca09140a7ab3.zip | |
Implement RFC 2951: Native link modifiers
This commit implements both the native linking modifiers infrastructure as well as an initial attempt at the individual modifiers from the RFC. It also introduces a feature flag for the general syntax along with individual feature flags for each modifier.
Diffstat (limited to 'compiler/rustc_feature/src/active.rs')
| -rw-r--r-- | compiler/rustc_feature/src/active.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 4ad5f085ad0..f747f854514 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -656,6 +656,21 @@ declare_features! ( /// Allows using imported `main` function (active, imported_main, "1.53.0", Some(28937), None), + /// Allows specifying modifiers in the link attribute: `#[link(modifiers = "...")]` + (active, native_link_modifiers, "1.53.0", Some(81490), None), + + /// Allows specifying the bundle link modifier + (active, native_link_modifiers_bundle, "1.53.0", Some(81490), None), + + /// Allows specifying the verbatim link modifier + (active, native_link_modifiers_verbatim, "1.53.0", Some(81490), None), + + /// Allows specifying the whole-archive link modifier + (active, native_link_modifiers_whole_archive, "1.53.0", Some(81490), None), + + /// Allows specifying the as-needed link modifier + (active, native_link_modifiers_as_needed, "1.53.0", Some(81490), None), + // ------------------------------------------------------------------------- // feature-group-end: actual feature gates // ------------------------------------------------------------------------- @@ -683,6 +698,11 @@ pub const INCOMPLETE_FEATURES: &[Symbol] = &[ sym::const_generics_defaults, sym::inherent_associated_types, sym::type_alias_impl_trait, + sym::native_link_modifiers, + sym::native_link_modifiers_bundle, + sym::native_link_modifiers_verbatim, + sym::native_link_modifiers_whole_archive, + sym::native_link_modifiers_as_needed, ]; /// Some features are not allowed to be used together at the same time, if |
