-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obsolete the --disable-elf-tls configure option #26581
Comments
For Firefox we use I guess that would become #[cfg(macosx_deployment_target)] or maybe #[cfg(target_version)]. MACOSX_DEPLOYMENT_TARGET
If -mmacosx-version-min is unspecified, the default deployment target
is read from this environment variable. This option only affects
darwin targets. To match clang's behaviour here rustc would include two versions of the standard library and selectively link to the one with or without TLS based on this variable. This is still a step in that direction, though, so I'm fine with the proposed change. "One distribution" is definitely better for our use in Firefox. |
This transitions the standard library's `thread_local!` macro to use the freshly-added and gated `#[cfg(target_thread_local)]` attribute. This greatly simplifies the `#[cfg]` logic in play here, but requires that the standard library expose both the OS and ELF TLS implementation modules as unstable implementation details. The implementation details were shuffled around a bit but end up generally compiling to the same thing. Closes rust-lang#26581 (this supersedes the need for the option) Closes rust-lang#27057 (this also starts ignoring the option)
This transitions the standard library's `thread_local!` macro to use the freshly-added and gated `#[cfg(target_thread_local)]` attribute. This greatly simplifies the `#[cfg]` logic in play here, but requires that the standard library expose both the OS and ELF TLS implementation modules as unstable implementation details. The implementation details were shuffled around a bit but end up generally compiling to the same thing. Closes rust-lang#26581 (this supersedes the need for the option) Closes rust-lang#27057 (this also starts ignoring the option)
This option was added to support OSX 10.6, but it's not ideal as it requires that a separate toolchain of Rust is downloaded to compile Rust code for Firefox on OSX. Ideally our support would look something like this:
#[cfg]
when this is set to allow the crate to know that it's targeting 10.6 (or whatever the relevant OSX target is)This will incur a perf hit for the standard library itself, but it would allow us to go back to "one distribution works everywhere" which is much nicer than "go build a separate copy of Rust to work on 10.6".
cc @rillian
The text was updated successfully, but these errors were encountered: