[clang] [llvm] Singleton hack of fixing static initialisation order fiasco (PR #154541)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 15:54:21 PDT 2025


mtrofin wrote:

> That's broken: modifying global variables like that isn't threadsafe (e.g. if you're doing LTO). But I guess it's equally broken with or without your patch.
[...]
> For FeatureMap, I'm not sure if it's supposed to be a plugin mechanism, or it can just be a member variable MLInlineAdvisor. The comments don't really explain why it's exposed in the header.

Addressed in PR #156120. Thanks for the find!

https://github.com/llvm/llvm-project/pull/154541


More information about the llvm-commits mailing list