mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Android before API 29 and a few other platforms don't support native TLS, so
fall back to LLVM's emulated TLS there, just like clang does. Also, make sure
`-Xcc -f{no-,}emulated-tls` flags passed in are applied to control what the
Swift compiler does.
8 lines
149 B
C
8 lines
149 B
C
#include "shims/SwiftStdint.h"
|
|
|
|
static inline __swift_uint32_t _swift_stdlib_gettid() {
|
|
static __thread __swift_uint32_t tid = 0;
|
|
|
|
return tid;
|
|
}
|