mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
std.Target: require libc for Android API levels prior to 29
Emulated TLS depends on libc pthread functions. Closes #24589.
This commit is contained in:
parent
259b7c3f3f
commit
03facba496
@ -2023,7 +2023,12 @@ pub fn requiresLibC(target: *const Target) bool {
|
||||
.serenity,
|
||||
=> true,
|
||||
|
||||
.linux
|
||||
// Android API levels prior to 29 did not have native TLS support. For these API levels, TLS
|
||||
// is implemented through calls to `__emutls_get_address`. We provide this function in
|
||||
// compiler-rt, but it's implemented by way of `pthread_key_create` et al, so linking libc
|
||||
// is required.
|
||||
.linux => target.abi.isAndroid() and target.os.version_range.linux.android < 29,
|
||||
|
||||
.windows,
|
||||
.freebsd,
|
||||
.netbsd,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user