[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 Nov 13 14:22:31 PST 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:

My understanding is that if a tls variable is defined inside a function, we don't call __dyn_tls_on_demand_init anyway.  But I don't care that much about the name.

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


More information about the cfe-commits mailing list