https://github.com/dcandler created 
https://github.com/llvm/llvm-project/pull/225822

A new test was added in 841dbaab188ecfa756d4c946f33b58758d34d339 which will 
fail when run on macOS if macOS is not set as the default target. This patch 
sets the same explicit target as in darwin-static-lib.c so that the test will 
not fail when the default changes.

>From 9a2de211081ee72570aaa06fbf269758657654f6 Mon Sep 17 00:00:00 2001
From: David Candler <[email protected]>
Date: Wed, 23 Sep 2026 16:16:13 +0100
Subject: [PATCH] [Clang] Set target in darwin-static-lib-universal.c

A new test was added in 841dbaab188ecfa756d4c946f33b58758d34d339
which will fail when run on macOS if macOS is not set as the
default target. This patch sets the same explicit target as in
darwin-static-lib.c so that the test will not fail on cross-builds.
---
 clang/test/Driver/darwin-static-lib-universal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/test/Driver/darwin-static-lib-universal.c 
b/clang/test/Driver/darwin-static-lib-universal.c
index 4ad542d4c77002..6eea70595b2987 100644
--- a/clang/test/Driver/darwin-static-lib-universal.c
+++ b/clang/test/Driver/darwin-static-lib-universal.c
@@ -5,7 +5,7 @@
 // Multiple -arch produces one libtool job per arch plus a lipo. -Xarch_ is 
only
 // forwarded to the matching architecture libtool. 
--static-lib-target-arch-only
 // should pick up the effective triple for each -arch.
-// RUN: %clang -### --emit-static-lib %t1.o %t2.o \
+// RUN: %clang -target i386-apple-darwin9 -### --emit-static-lib %t1.o %t2.o \
 // RUN:     -arch x86_64 -arch arm64 --static-lib-target-arch-only \
 // RUN:     -Xarch_arm64 --no-static-lib-deterministic \
 // RUN:     -Xarch_x86_64 --static-lib-warn-no-symbols -o libfoo.a 2>&1 \

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to