r"\bllvm-link\b",
r"\bllvm-lto\b",
r"\bllvm-mc\b",
+ r"\bllvm-mcmarkup\b",
r"\bllvm-nm\b",
r"\bllvm-objdump\b",
r"\bllvm-ranlib\b",
r"\bllvm-shlib\b",
r"\bllvm-size\b",
r"\bllvm-tblgen\b",
+ r"\bllvm-c-test\b",
# Match llvmc but not -llvmc
NOHYPHEN + r"\bllvmc\b",
# Match lto but not -lto
r"\bFileUpdate\b",
r"\bc-index-test\b",
r"\bfpcmp\b",
+ r"\bobj2yaml\b",
+ r"\byaml2obj\b",
# Handle these specially as they are strings searched
# for during testing.
r"\| \bcount\b",
config.available_features.add("zlib")
# Native compilation: host arch == target arch
-if config.host_arch in config.target_triple:
+# FIXME: Consider cases that target can be executed
+# even if host_triple were different from target_triple.
+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: