[llvm-commits] [llvm] r145230 - /llvm/trunk/test/lit.cfg

NAKAMURA Takumi geek4civic at gmail.com
Sun Nov 27 21:09:15 PST 2011


Author: chapuni
Date: Sun Nov 27 23:09:15 2011
New Revision: 145230

URL: http://llvm.org/viewvc/llvm-project?rev=145230&view=rev
Log:
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.

Modified:
    llvm/trunk/test/lit.cfg

Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=145230&r1=145229&r2=145230&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Sun Nov 27 23:09:15 2011
@@ -283,5 +283,10 @@
 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()





More information about the llvm-commits mailing list