# llc knows whether he is compiled with -DNDEBUG.
import subprocess
-llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
+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()