[llvm] [BasicAA][TLI] Local-linkage or non-thread-local globals may not alias errno (PR #170290)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 6 09:03:16 PST 2025
antoniofrighetto wrote:
Updated by dropping IsErrnoThreadLocal.
> Unusual/baremetal environments usually end up using -ffreestanding for various reasons. So we don't really care what happens there, as long as we don't do errno checks with -ffreestanding. I'm not sure we actually suppress the checks currently, though.
I believe the only way to infer -ffreestanding is from the target triple. From https://clang.llvm.org/docs/CrossCompilation.html:
> The system name is generally the OS (linux, darwin), but could be special like the bare-metal “none”.
Triple.cpp also considers none as environment to model freestanding:
https://github.com/llvm/llvm-project/blob/7ac29007187e43c2b5224a0334f82800f5109a34/llvm/lib/TargetParser/Triple.cpp#L1435-L1438
Not doing any assumptions on 1) unknown environments unless Darwin 2) "none" OS.
https://github.com/llvm/llvm-project/pull/170290
More information about the llvm-commits
mailing list