# Shell execution
if platform.system() not in ['Windows'] or lit.getBashPath() != '':
config.available_features.add('shell')
+
+# llc knows whether it is compiled with -DNDEBUG.
+import subprocess
+try:
+ llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
+ stdout = subprocess.PIPE)
+except OSError, why:
+ print "Could not find llc in " + llvm_tools_dir
+ exit(42)
+
+if re.search(r'with assertions', llc_cmd.stdout.read()):
+ config.available_features.add('asserts')
+llc_cmd.wait()