Skip to content
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

Enable #[cfg(target_thread_local)] #15

Closed
ian-h-chamberlain opened this issue Feb 18, 2022 · 2 comments · Fixed by #16
Closed

Enable #[cfg(target_thread_local)] #15

ian-h-chamberlain opened this issue Feb 18, 2022 · 2 comments · Fixed by #16

Comments

@ian-h-chamberlain
Copy link

This is falling out from the discussion in rust3ds/pthread-3ds#13

Based on rust-lang#91659 – many targets default to false for has_thread_local, including armv6k-nintendo-3ds. Based on our testing #[thread_local] does work on this platform, and as someone pointed out it appears all ARM targets actually support the #[thread_local] attribute.

I think we should add has_thread_local: true to take advantage of the "fast" thread-local support builtin to std: https://github.com/Meziu/rust-horizon/blob/horizon-std/library/std/src/thread/mod.rs#L186

I can do it (trivial change) but I wanted to make sure everyone's on board before submitting a PR to update the target. I'm building a local version of the compiler to test as well.

@AzureMarker
Copy link

Sounds good, open a PR and we can test and discuss there too.

@AzureMarker
Copy link

AzureMarker commented Mar 31, 2022

This was merged into upstream in rust-lang#95341
(I don't have permission to close this issue myself)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants