rust/compiler/rustc_codegen_llvm/src
bors 608f32435a 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`
2023-12-09 05:32:35 +00:00
..
back Auto merge of #117873 - quininer:android-emutls, r=Amanieu 2023-12-09 05:32:35 +00:00
coverageinfo merge DefKind::Coroutine into DefKind::Closure 2023-11-26 21:05:08 +08:00
debuginfo Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
llvm Add emulated TLS support 2023-12-07 00:21:32 +08:00
abi.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
allocator.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
asm.rs Auto merge of #114467 - Amanieu:asm-unstable-features, r=davidtwco 2023-08-15 11:59:02 +00:00
attributes.rs Add -Zfunction-return={keep,thunk-extern} option 2023-11-30 20:21:31 +01:00
base.rs cg_llvm: remove pointee types and pointercast/bitcast-of-ptr 2023-07-29 13:18:17 -04:00
builder.rs more targeted errors when extern types end up in places they should not 2023-12-03 08:11:15 +01:00
callee.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
common.rs ctfe interpreter: extend provenance so that it can track whether a pointer is immutable 2023-12-07 17:46:36 +01:00
consts.rs ctfe interpreter: extend provenance so that it can track whether a pointer is immutable 2023-12-07 17:46:36 +01:00
context.rs Add emulated TLS support 2023-12-07 00:21:32 +08:00
declare.rs CFI: Fix SIGILL reached via trait objects 2023-05-09 20:04:19 +00:00
errors.rs De-genericize some IntoDiagnostic impls. 2023-12-04 18:57:42 +11:00
intrinsic.rs Merge simd size and type extraction into checking whether a type is simd, as these always go together. 2023-10-31 11:23:39 +00:00
lib.rs Add emulated TLS support 2023-12-07 00:21:32 +08:00
llvm_util.rs Rollup merge of #118142 - saethlin:llvm-linkage, r=tmiasko 2023-11-22 09:28:51 -08:00
mono_item.rs use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
type_.rs remove unused pub fn 2023-11-23 14:11:02 +03:00
type_of.rs Clean dead codes 2023-11-26 09:25:07 +08:00
va_arg.rs cg_llvm: remove pointee types and pointercast/bitcast-of-ptr 2023-07-29 13:18:17 -04:00
value.rs