1. 22 12月, 2015 2 次提交
    • A
      syntax: Respect allow_internal_unstable in macros · 617a7af7
      Alex Crichton 提交于
      This change modifies the feature gating of special `#[cfg]` attributes to not
      require a `#![feature]` directive in the crate-of-use if the source of the macro
      was declared with `#[allow_internal_unstable]`. This enables the standard
      library's macro for `thread_local!` to make use of the
      `#[cfg(target_thread_local)]` attribute despite it being feature gated (e.g.
      it's a hidden implementation detail).
      617a7af7
    • A
      rustc: Add feature-gated cfg(target_thread_local) · b67b5a8d
      Alex Crichton 提交于
      Currently the standard library has some pretty complicated logic to detect
      whether #[thread_local] should be used or whether it's supported. This is also
      unfortunately not quite true for OSX where not all versions support
      the #[thread_local] attribute (only 10.7+ does). Compiling code for OSX 10.6 is
      typically requested via the MACOSX_DEPLOYMENT_TARGET environment variable (e.g.
      the linker recognizes this), but the standard library unfortunately does not
      respect this.
      
      This commit updates the compiler to add a `target_thread_local` cfg annotation
      if the platform being targeted supports the `#[thread_local]` attribute. This is
      feature gated for now, and it is only true on non-aarch64 Linux and 10.7+ OSX
      (e.g. what the module already does today). Logic has also been added to parse
      the deployment target environment variable.
      b67b5a8d
  2. 19 12月, 2015 15 次提交
  3. 18 12月, 2015 23 次提交