summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index df1f4a1019..251dbe0966 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -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: