diff options
-rw-r--r-- | test/lit.cfg | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index 1f08c9320d..6bc170cdf9 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -283,5 +283,10 @@ else: if loadable_module: config.available_features.add('loadable_module') -if config.enable_assertions: +# llc knows whether he is compiled with -DNDEBUG. +import subprocess +llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'], + stdout = subprocess.PIPE) +if re.search(r'with assertions', llc_cmd.stdout.read()): config.available_features.add('asserts') +llc_cmd.wait() |