llvm: Reduce overlinking with the minimal llvm

We only need to link against libz and libzstd when linking against the
fill libllvm, libllvmminimal doesn't use either library. Move adding
libz and libzstd to the list of libraries to link against to where
we decide to use the full libllvm.

Reported by:	Cristian Marussi <Cristian.Marussi@arm.com>
Reported by:	Colin S. Gordon <csgordon@fastmail.com>
Reviewed by:	dim
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42528
This commit is contained in:
Andrew Turner 2023-11-09 13:00:51 +00:00
parent 8f2848eafa
commit 83771b1914
2 changed files with 4 additions and 4 deletions

View File

@ -14,6 +14,8 @@ LIBDEPS+= llvmminimal
.else
LIBDEPS+= clang
LIBDEPS+= llvm
LIBADD+= z
LIBADD+= zstd
.endif
.for lib in ${LIBDEPS}
@ -28,7 +30,5 @@ LIBADD+= execinfo
LIBADD+= ncursesw
.endif
LIBADD+= pthread
LIBADD+= z
LIBADD+= zstd
.include <bsd.prog.mk>

View File

@ -12,6 +12,8 @@ CFLAGS+= -I${OBJTOP}/lib/clang/libllvm
LIBDEPS+= llvmminimal
.else
LIBDEPS+= llvm
LIBADD+= z
LIBADD+= zstd
.endif
.for lib in ${LIBDEPS}
@ -26,7 +28,5 @@ LIBADD+= execinfo
LIBADD+= tinfow
.endif
LIBADD+= pthread
LIBADD+= z
LIBADD+= zstd
.include <bsd.prog.mk>