r"\bllvm-extract\b", r"\bllvm-jistlistener\b",
r"\bllvm-link\b", r"\bllvm-mc\b",
r"\bllvm-nm\b", r"\bllvm-objdump\b",
- r"\bllvm-prof\b", r"\bllvm-size\b",
+ r"\bllvm-prof\b", r"\bllvm-ranlib\b",
r"\bllvm-rtdyld\b", r"\bllvm-shlib\b",
+ r"\bllvm-size\b",
# Match llvmc but not -llvmc
NOHYPHEN + r"\bllvmc\b",
r"\blto\b",
if config.have_zlib == "1":
config.available_features.add("zlib")
+# Native compilation: host arch == target arch
+if config.host_arch in config.target_triple:
+ config.available_features.add("native")
+
# llc knows whether he is compiled with -DNDEBUG.
import subprocess
try:
config.available_features.add('asserts')
llc_cmd.wait()
+if 'darwin' == sys.platform:
+ try:
+ sysctl_cmd = subprocess.Popen(['sysctl', 'hw.optional.fma'],
+ stdout = subprocess.PIPE)
+ except OSError:
+ print("Could not exec sysctl")
+ result = sysctl_cmd.stdout.read().decode('ascii')
+ if -1 != result.find("hw.optional.fma: 1"):
+ config.available_features.add('fma3')
+ sysctl_cmd.wait()
+
# Check if we should use gmalloc.
use_gmalloc_str = lit_config.params.get('use_gmalloc', None)
if use_gmalloc_str is not None: