From 287e0899271ed42075e7688ff836b909e5e046c8 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Wed, 23 Oct 2013 02:53:53 +0200 Subject: [PATCH] Add info to -version if compiled with address sanitizer --- driver/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/driver/main.cpp b/driver/main.cpp index 3b7de563..50c4563f 100644 --- a/driver/main.cpp +++ b/driver/main.cpp @@ -88,6 +88,11 @@ static cl::list debuglibs("debuglib", void printVersion() { printf("LDC - the LLVM D compiler (%s):\n", global.ldc_version); printf(" based on DMD %s and LLVM %s\n", global.version, global.llvm_version); +#if defined(__has_feature) +#if __has_feature(address_sanitizer) + printf(" compiled with address sanitizer enabled\n"); +#endif +#endif printf(" Default target: %s\n", llvm::sys::getDefaultTargetTriple().c_str()); std::string CPU = llvm::sys::getHostCPUName(); if (CPU == "generic") CPU = "(unknown)";