-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Replace no_elf_tls with target_thread_local #30678
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
Thanks! Looks like I forgot to cover scoped TLS when I changed it. Could you leave around the |
I added the |
I also re-enabled the use of `#[thread_local]` on AArch64. It was originally disabled in the PR that introduced AArch64 (#19790), but the reasons for this were not explained. `#[thread_local]` seems to work fine in my tests on AArch64, so I don't think this should be an issue. cc @alexcrichton @akiss77
Support for disabling ELF-style thread local storage in the standard library at configure time was removed in pulls rust-lang#30417 and rust-lang#30678, in favour of a member in the TargetOptions database. The new method respects MACOSX_DEPLOYMENT_TARGET on macOS, addressing the original use case for this configure option. However, those commits left the configure option itself in place. It's no longer referenced anywhere and can be removed.
Remove obsolete --disable-elf-tls configure switch. Support for disabling ELF-style thread local storage in the standard library at configure time was removed in pulls #30417 and #30678, in favour of a member in the TargetOptions database. The new mentod respects MACOSX_DEPLOYMENT_TARGET on macOS, addressing the original use case for this configure optionl However, those commits left the configure option itself in place. It's no longer referenced anywhere and can be removed.
#30417 replaced the
--disable-elf-tls
configure option with acfg(target_thread_local)
target attribute forthread_local!
, butscoped_thread_local!
still used the oldcfg(no_elf_tls)
option. This PR changesscoped_thread_local!
to usecfg(target_thread_local)
to determine whether the#[thread_local]
attribute is available. It also removes the--disable-elf-tls
configure option since it is no longer used.I also re-enabled the use of
#[thread_local]
on AArch64. It was originally disabled in the PR that introduced AArch64 (#19790), but the reasons for this were not explained.#[thread_local]
seems to work fine in my tests on AArch64, so I don't think this should be an issue.cc @alexcrichton @akiss77