about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-12-09 05:32:35 +0000
committerbors <bors@rust-lang.org>2023-12-09 05:32:35 +0000
commitc578f4302ccbe2a91ebb15f5edfd0686c9148f94 (patch)
tree42d9d1e22396b23a4e97211a62099f7264f0daca /tests/codegen/src-hash-algorithm
parent17f0dd589812dd5432d077a4f63e33f1281b7cf2 (diff)
parent2baa073fb1dc1a3556d174b58e5bc94b28682119 (diff)
downloadrust-c578f4302ccbe2a91ebb15f5edfd0686c9148f94.tar.gz
rust-c578f4302ccbe2a91ebb15f5edfd0686c9148f94.zip
Auto merge of #117873 - quininer:android-emutls, r=Amanieu
Add emulated TLS support

This is a reopen of https://github.com/rust-lang/rust/pull/96317 . many android devices still only use 128 pthread keys, so using emutls can be helpful.

Currently LLVM uses emutls by default for some targets (such as android, openbsd), but rust does not use it, because `has_thread_local` is false.

This commit has some changes to allow users to enable emutls:

1. add `-Zhas-thread-local` flag to specify that std uses `#[thread_local]` instead of pthread key.
2. when using emutls, decorate symbol names to find thread local symbol correctly.
3. change `-Zforce-emulated-tls` to `-Ztls-model=emulated` to explicitly specify whether to generate emutls.

r? `@Amanieu`
Diffstat (limited to 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions