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
15 changes: 12 additions & 3 deletions compiler-rt/test/asan/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ def get_required_attr(config, attr_name):
default_asan_opts = list(config.default_sanitizer_opts)

# On Darwin, leak checking is not enabled by default. Enable on macOS
# tests to prevent regressions
if config.host_os == "Darwin" and config.apple_platform == "osx":
# tests to prevent regressions.
# Currently, detect_leaks for asan tests only work on Intel MacOS.
if (
config.host_os == "Darwin"
and config.apple_platform == "osx"
and config.target_arch == "x86_64"
):
default_asan_opts += ["detect_leaks=1"]

default_asan_opts_str = ":".join(default_asan_opts)
Expand Down Expand Up @@ -273,7 +278,11 @@ def build_invocation(compile_flags, with_lto=False):
and (not config.android)
and (config.target_arch in ["x86_64", "i386", "riscv64", "loongarch64"])
)
leak_detection_mac = (config.host_os == "Darwin") and (config.apple_platform == "osx")
leak_detection_mac = (
(config.host_os == "Darwin")
and (config.apple_platform == "osx")
and (config.target_arch == "x86_64")
)
leak_detection_netbsd = (config.host_os == "NetBSD") and (
config.target_arch in ["x86_64", "i386"]
)
Expand Down