summaryrefslogtreecommitdiff
path: root/tools/llvm-config
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-config')
-rw-r--r--tools/llvm-config/llvm-config.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index fc47bdee36..f7b643e6f2 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -154,6 +154,7 @@ Options:\n\
--targets-built List of all targets currently built.\n\
--host-target Target triple used to configure LLVM.\n\
--build-mode Print build mode of LLVM tree (e.g. Debug or Release).\n\
+ --assertion-mode Print assertion mode of LLVM tree (ON or OFF).\n\
Typical components:\n\
all All LLVM libraries (default).\n\
engine Either a native JIT or a bitcode interpreter.\n";
@@ -306,6 +307,12 @@ int main(int argc, char **argv) {
build_mode = CMAKE_CFG_INTDIR;
#endif
OS << build_mode << '\n';
+ } else if (Arg == "--assertion-mode") {
+#if defined(NDEBUG)
+ OS << "OFF\n";
+#else
+ OS << "ON\n";
+#endif
} else if (Arg == "--obj-root") {
OS << LLVM_OBJ_ROOT << '\n';
} else if (Arg == "--src-root") {