[llvm] [test] llvm-ar: Fix inadvertent unXFAIL for Apple platforms (PR #159796)

Anthony Latsis via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 09:02:33 PDT 2025


https://github.com/AnthonyLatsis updated https://github.com/llvm/llvm-project/pull/159796

>From 0e1ccbad0935e64ee14a695a4713943a8801862c Mon Sep 17 00:00:00 2001
From: Anthony Latsis <alatsis at apple.com>
Date: Fri, 19 Sep 2025 15:44:50 +0100
Subject: [PATCH] [test] llvm-ar: Fix inadvertent unXFAIL for Apple platforms

The history of these XFAILs is clouded. Initially added as target-based
checks in
https://github.com/llvm/llvm-project/commit/629273ec09825b870ce53e6419296d73519b1e24
for somewhat vague reasons, soon after switched to host-based checks in
https://github.com/llvm/llvm-project/commit/20b2cd3c0bfe8f732bb135edb7f3c8436d005fe9
"due to the problem being related to the darwin host and not the
target", and recently reverted back to target-based in
https://github.com/llvm/llvm-project/pull/130144 because, to my
understanding, the tests can unexpectedly pass on arm64 macOS with
`llvm-ar` cross-compiled to baremetal arm64.

Anyway, the problem with the current `target={{.*}}-darwin{{.*}}` is
that the Swift build script uses Apple platform names like 'macosx', not
'darwin', for the LLVM target triple.
---
 llvm/test/tools/llvm-ar/extract.test | 1 +
 llvm/test/tools/llvm-ar/print.test   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/llvm/test/tools/llvm-ar/extract.test b/llvm/test/tools/llvm-ar/extract.test
index bf46cc0743c7d..474dc8bb530ec 100644
--- a/llvm/test/tools/llvm-ar/extract.test
+++ b/llvm/test/tools/llvm-ar/extract.test
@@ -1,5 +1,6 @@
 ## Test extract operation.
 # XFAIL: target={{.*}}-darwin{{.*}}
+# XFAIL: target={{.*}}-apple{{.*}}
 
 # RUN: rm -rf %t && mkdir -p %t/extracted/
 
diff --git a/llvm/test/tools/llvm-ar/print.test b/llvm/test/tools/llvm-ar/print.test
index 997c05f225a8b..30169de9344fc 100644
--- a/llvm/test/tools/llvm-ar/print.test
+++ b/llvm/test/tools/llvm-ar/print.test
@@ -1,5 +1,6 @@
 ## Test Print output
 # XFAIL: target={{.*}}-darwin{{.*}}
+# XFAIL: target={{.*}}-apple{{.*}}
 
 # RUN: rm -rf %t && mkdir -p %t
 # RUN: echo file1 > %t/1.txt



More information about the llvm-commits mailing list