From 8284ec46b62fb49938c9ccbcbfa273a18fe1b917 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 28 Nov 2011 05:09:15 +0000 Subject: [PATCH] test/lit.cfg: Enable the feature 'asserts' to check output of llc -version. llc knows whether he is compiled with -DNDEBUG. | Optimized build with assertions. llvm-svn: 145230 --- llvm/test/lit.cfg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index 1f08c9320d9c..6bc170cdf944 100644 --- a/llvm/test/lit.cfg +++ b/llvm/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()