Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions llvm/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def get_asan_rtlib():
]
)


# Find (major, minor) version of ptxas
def ptxas_version(ptxas):
ptxas_cmd = subprocess.Popen([ptxas, "--version"], stdout=subprocess.PIPE)
Expand Down Expand Up @@ -451,7 +452,7 @@ def version_int(ver):
"%llvmdylib",
"{}/libLLVM{}.{}".format(
config.llvm_shlib_dir, config.llvm_shlib_ext, config.llvm_dylib_version
)
),
)
)

Expand Down Expand Up @@ -582,14 +583,15 @@ def have_ld64_plugin_support():
if have_ld64_plugin_support():
config.available_features.add("ld64_plugin")


def host_unwind_supports_jit():
# Do we expect the host machine to support JIT registration of clang's
# default unwind info format for the host (e.g. eh-frames, compact-unwind,
# etc.).

# Linux and the BSDs use DWARF eh-frames and all known unwinders support
# register_frame at minimum.
if platform.system() in [ "Linux", "FreeBSD", "NetBSD" ]:
if platform.system() in ["Linux", "FreeBSD", "NetBSD"]:
return True

# Windows does not support frame info without the ORC runtime.
Expand All @@ -601,11 +603,7 @@ def host_unwind_supports_jit():
# compact-unwind only, and JIT'd registration is not available before
# macOS 14.0.
if platform.system() == "Darwin":

assert (
"arm64" in config.host_triple
or "x86_64" in config.host_triple
)
assert "arm64" in config.host_triple or "x86_64" in config.host_triple

if "x86_64" in config.host_triple:
return True
Expand All @@ -627,6 +625,7 @@ def host_unwind_supports_jit():

return False


if host_unwind_supports_jit():
config.available_features.add("host-unwind-supports-jit")

Expand Down