diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-12-10 12:21:55 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-12-21 22:05:37 -0800 |
| commit | b67b5a8d0149096712e75336f6aa32daffcaa42d (patch) | |
| tree | 1e8c3ac5add64bbdad0738bf36566254b94a1fa1 /src/libstd/sys/unix/stack_overflow.rs | |
| parent | d8cc67fb26544ccd6b0292a3e3ddc730131e9256 (diff) | |
| download | rust-b67b5a8d0149096712e75336f6aa32daffcaa42d.tar.gz rust-b67b5a8d0149096712e75336f6aa32daffcaa42d.zip | |
rustc: Add feature-gated cfg(target_thread_local)
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.
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
