[all-commits] [llvm/llvm-project] 0b1639: [libc] Change LIBC_THREAD_LOCAL to be dependent on...

William Huynh via All-commits all-commits at lists.llvm.org
Wed Aug 6 07:04:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b1639581a14e6e99ffff1a155504e4e866df491
      https://github.com/llvm/llvm-project/commit/0b1639581a14e6e99ffff1a155504e4e866df491
  Author: William Huynh <William.Huynh at arm.com>
  Date:   2025-08-06 (Wed, 06 Aug 2025)

  Changed paths:
    M cmake/Modules/FindLibcCommonUtils.cmake
    M libc/src/__support/macros/attributes.h
    M libc/src/__support/threads/mutex.h

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list