[clang] Add option -fstdlib-hardening= (PR #78763)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 20 04:13:38 PST 2024


================
@@ -7730,6 +7730,14 @@ def source_date_epoch : Separate<["-"], "source-date-epoch">,
 
 } // let Visibility = [CC1Option]
 
+def stdlib_hardening_EQ : Joined<["-"], "fstdlib-hardening=">,
+  Values<"none,fast,extensive,debug">,
+  NormalizedValues<["STDLIB_HARDENING_MODE_NONE", "STDLIB_HARDENING_MODE_FAST", "STDLIB_HARDENING_MODE_EXTENSIVE", "STDLIB_HARDENING_MODE_DEBUG"]>,
+  Visibility<[ClangOption, CC1Option]>,
+  HelpText<"standard library hardening mode">,
+  NormalizedValuesScope<"LangOptions">,
+  MarshallingInfoEnum<LangOpts<"StdlibHardeningMode">, "STDLIB_HARDENING_MODE_NOT_SPECIFIED">;
----------------
cor3ntin wrote:

Can we add documentation (`DocName`) ?

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


More information about the cfe-commits mailing list