git: d478715a7289 - main - llvm: Link cross-tools with static libllvm.a

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Thu, 19 Mar 2026 13:18:16 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=d478715a72892537d37a70efcb82ee572ac5741a

commit d478715a72892537d37a70efcb82ee572ac5741a
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-03-19 02:01:13 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-03-19 13:10:24 +0000

    llvm: Link cross-tools with static libllvm.a
    
    We generally use TOOLS_PREFIX being set to indicate that we are building
    in the cross-build tools stage.  This check was missing for llvm.prog.mk
    consumers other than *tblgen, which have not previously been built as
    cross tools.
    
    Reviewed by:    dim
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D55930
---
 usr.bin/clang/llvm.prog.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/clang/llvm.prog.mk b/usr.bin/clang/llvm.prog.mk
index 00f319a246fb..fa9abf020295 100644
--- a/usr.bin/clang/llvm.prog.mk
+++ b/usr.bin/clang/llvm.prog.mk
@@ -14,7 +14,7 @@ LIBPRIV=
 LIBEXT=		a
 .else
 LIBDEPS+=	llvm
-.if ${MK_LLVM_LINK_STATIC_LIBRARIES} == "yes"
+.if defined(TOOLS_PREFIX) || ${MK_LLVM_LINK_STATIC_LIBRARIES} == "yes"
 LIBPRIV=
 LIBEXT=		a
 .else