summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2011-11-28 05:09:15 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2011-11-28 05:09:15 +0000
commitf86186ee244f3c938d04e0fccfa702410698c47b (patch)
tree86c3af202c3be6a06734f9bec8158e140442b4ca /test/lit.cfg
parentb0c95fbaf9ef8877ac2ace5e706ae7487b6dc6e1 (diff)
downloadllvm-f86186ee244f3c938d04e0fccfa702410698c47b.tar.gz
llvm-f86186ee244f3c938d04e0fccfa702410698c47b.tar.bz2
llvm-f86186ee244f3c938d04e0fccfa702410698c47b.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg7
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()