[Sparc] Emit retl/ret instead of jmp instruction. It improves the readability of...
[oota-llvm.git] / test / lit.cfg
index df1f4a101965bffa707e8ba41287cd355ff5ce9d..251dbe0966c204d31a7515aca8a2de74c3b2d1ca 100644 (file)
@@ -305,18 +305,19 @@ if config.have_zlib == "1":
 if config.host_triple == config.target_triple:
     config.available_features.add("native")
 
-# llc knows whether he is compiled with -DNDEBUG.
+# Ask llvm-config about assertion mode.
 import subprocess
 try:
-    llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
-                           stdout = subprocess.PIPE)
+    llvm_config_cmd = subprocess.Popen(
+        [os.path.join(llvm_tools_dir, 'llvm-config'), '--assertion-mode'],
+        stdout = subprocess.PIPE)
 except OSError:
-    print("Could not find llc in " + llvm_tools_dir)
+    print("Could not find llvm-config in " + llvm_tools_dir)
     exit(42)
 
-if re.search(r'with assertions', llc_cmd.stdout.read().decode('ascii')):
+if re.search(r'ON', llvm_config_cmd.stdout.read().decode('ascii')):
     config.available_features.add('asserts')
-llc_cmd.wait()
+llvm_config_cmd.wait()
 
 if 'darwin' == sys.platform:
     try: