llvm-project
0b163958 - [libc] Change LIBC_THREAD_LOCAL to be dependent on LIBC_THREAD_MODE (#151527)

Commit
38 days ago
[libc] Change LIBC_THREAD_LOCAL to be dependent on LIBC_THREAD_MODE (#151527) When single-threaded mode is selected, all instances of the keyword `LIBC_THREAD_LOCAL` are stubbed out, similar to how it currently works on the GPU. This allows baremetal builds to avoid using thread_local. However, libcxx uses shared headers, so we need to be careful there. Thankfully, there is already an option to disable multithreading in libcxx, so a flag is added such that single-threaded mode is propagated down to libc.
Author
Parents
Loading