[clang] [llvm] [driver] Make --version show if assertions, etc. are enabled (PR #87585)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 4 16:15:14 PDT 2024
================
@@ -2734,6 +2734,39 @@ void cl::PrintHelpMessage(bool Hidden, bool Categorized) {
CommonOptions->CategorizedHiddenPrinter.printHelp();
}
+ArrayRef<StringRef> cl::CompilerBuildConfig = {
+#if LLVM_IS_DEBUG_BUILD
+ "+unoptimized",
+#endif
+#ifndef NDEBUG
+ "+assertions",
+#endif
+#ifdef EXPENSIVE_CHECKS
+ "+expensive-checks",
+#endif
+#if __has_feature(address_sanitizer)
+ "+asan",
+#endif
+#if __has_feature(undefined_behavior_sanitizer)
----------------
MaskRay wrote:
sort sanitizers alphabetically?
You can add thread_sanitizer and `hwaddress_sanitizer` as well
https://github.com/llvm/llvm-project/pull/87585
More information about the cfe-commits
mailing list