[compiler-rt] [Darwin][Test][leaks] Disable leak detection for asan tests on non-Intel Darwin devices (PR #131676)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 17 14:47:45 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 3959bbc1345b9eb99b208e816a86e6a39103c345...3ac5ed8d35a8f9b1ed43dc1f3a1be9dce6eceb38 compiler-rt/test/asan/lit.cfg.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- lit.cfg.py 2025-03-17 21:38:19.000000 +0000
+++ lit.cfg.py 2025-03-17 21:47:19.438548 +0000
@@ -25,12 +25,15 @@
default_asan_opts = list(config.default_sanitizer_opts)
# On Darwin, leak checking is not enabled by default. Enable on macOS
# 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"):
+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)
if default_asan_opts_str:
config.environment["ASAN_OPTIONS"] = default_asan_opts_str
@@ -273,12 +276,14 @@
leak_detection_linux = (
(config.host_os == "Linux")
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") and (
- config.target_arch == "x86_64"
+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"]
)
if (
``````````
</details>
https://github.com/llvm/llvm-project/pull/131676
More information about the llvm-commits
mailing list