[clang] [MS] Add /Zc:tlsGuards option to control tls guard emission (PR #113830)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 30 13:39:53 PDT 2024
================
@@ -4063,6 +4063,11 @@ defm threadsafe_statics : BoolFOption<"threadsafe-statics",
NegFlag<SetFalse, [], [ClangOption, CC1Option],
"Do not emit code to make initialization of local statics thread safe">,
PosFlag<SetTrue>>;
+defm tls_guards : BoolFOption<"tls-guards",
+ LangOpts<"TlsGuards">, DefaultTrue,
----------------
efriedma-quic wrote:
If we're going to expose this as a clang option (instead of just a clang-cc1 option), this needs a better name and description. This specifically applies to the MS ABI rules for thread-local variables not defined inside a function definition. Maybe call it `-fms-nonlocal-tls-guards`? Not sure.
https://github.com/llvm/llvm-project/pull/113830
More information about the cfe-commits
mailing list