Skip to content

Commit

Permalink
Move LIBADD lines from usr.bin/clang/*/Makefile one level up
Browse files Browse the repository at this point in the history
Some utilities under usr.bin/clang were only linked to libz, while most
others were linked to libz and libzstd. Make this consistent, and remove
repetition, by moving these LIBADD lines to usr.bin/clang/clang.prog.mk
and usr.bin/clang/clang.prog.mk.

MFC after:	3 days

(cherry picked from commit f576172)
  • Loading branch information
DimitryAndric committed Jul 26, 2023
1 parent f1f27df commit ca54e5c
Show file tree
Hide file tree
Showing 26 changed files with 4 additions and 69 deletions.
3 changes: 0 additions & 3 deletions usr.bin/clang/bugpoint/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,4 @@ SRCS+= OptimizerDriver.cpp
SRCS+= ToolRunner.cpp
SRCS+= bugpoint.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
2 changes: 2 additions & 0 deletions usr.bin/clang/clang.prog.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ LIBADD+= execinfo
LIBADD+= ncursesw
.endif
LIBADD+= pthread
LIBADD+= z
LIBADD+= zstd

.include <bsd.prog.mk>
3 changes: 0 additions & 3 deletions usr.bin/clang/clang/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ MLINKS+= clang.1 cc.1 \
clang.1 cpp.1
.endif

LIBADD+= z
LIBADD+= zstd

# Ensure we don't add CFLAGS.clang when using GCC
NO_TARGET_FLAGS=

Expand Down
3 changes: 0 additions & 3 deletions usr.bin/clang/llc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ PROG_CXX= llc
SRCDIR= llvm/tools/llc
SRCS+= llc.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/lli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ SRCDIR= llvm/tools/lli
SRCS+= ExecutionUtils.cpp
SRCS+= lli.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-ar/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ SRCS+= llvm-ar.cpp

CFLAGS.llvm-ar.cpp+= -Dllvm_ar_main=main

LIBADD+= z
LIBADD+= zstd

LINKS+= ${BINDIR}/llvm-ar ${BINDIR}/llvm-ranlib

.if ${MK_LLVM_BINUTILS} != "no"
Expand Down
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-cov/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,4 @@ SRCS+= TestingSupport.cpp
SRCS+= gcov.cpp
SRCS+= llvm-cov.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-dwarfdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ SRCS+= SectionSizes.cpp
SRCS+= Statistics.cpp
SRCS+= llvm-dwarfdump.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-dwarfutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,4 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-dwp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ MAN=
SRCDIR= llvm/tools/llvm-dwp
SRCS+= llvm-dwp.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
2 changes: 0 additions & 2 deletions usr.bin/clang/llvm-extract/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ PROG_CXX= llvm-extract
SRCDIR= llvm/tools/llvm-extract
SRCS+= llvm-extract.cpp

LIBADD+= z

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-lto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ MAN=
SRCDIR= llvm/tools/llvm-lto
SRCS= llvm-lto.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-lto2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ MAN=
SRCDIR= llvm/tools/llvm-lto2
SRCS= llvm-lto2.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-mc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ SRCDIR= llvm/tools/llvm-mc
SRCS+= Disassembler.cpp
SRCS+= llvm-mc.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
2 changes: 0 additions & 2 deletions usr.bin/clang/llvm-mca/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@ SRCS+= llvm-mca.cpp

CFLAGS+= -I${LLVM_BASE}/${SRCDIR}

LIBADD+= z

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-nm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

LIBADD+= z
LIBADD+= zstd

.if ${MK_LLVM_BINUTILS} != "no"
LINKS+= ${BINDIR}/llvm-nm ${BINDIR}/nm
MLINKS+= llvm-nm.1 nm.1
Expand Down
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-objcopy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

LIBADD+= z
LIBADD+= zstd

LINKS= ${BINDIR}/llvm-objcopy ${BINDIR}/llvm-strip

.if ${MK_LLVM_BINUTILS} != "no"
Expand Down
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-objdump/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

LIBADD+= z
LIBADD+= zstd

LINKS= ${BINDIR}/llvm-objdump ${BINDIR}/objdump
MLINKS= llvm-objdump.1 objdump.1

Expand Down
2 changes: 0 additions & 2 deletions usr.bin/clang/llvm-pdbutil/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ SRCS+= TypeReferenceTracker.cpp
SRCS+= YAMLOutputStyle.cpp
SRCS+= llvm-pdbutil.cpp

LIBADD+= z

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-profdata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ SRCS+= llvm-profdata.cpp

CFLAGS.llvm-profdata.cpp+= -Dllvm_profdata_main=main

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-readobj/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

LIBADD+= z
LIBADD+= zstd

LINKS+= ${BINDIR}/llvm-readobj ${BINDIR}/llvm-readelf

.if ${MK_LLVM_BINUTILS} != "no"
Expand Down
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-rtdyld/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ MAN=
SRCDIR= llvm/tools/llvm-rtdyld
SRCS+= llvm-rtdyld.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-symbolizer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

LIBADD+= z
LIBADD+= zstd

LINKS+= ${BINDIR}/llvm-symbolizer ${BINDIR}/llvm-addr2line

.if ${MK_LLVM_BINUTILS} != "no"
Expand Down
3 changes: 0 additions & 3 deletions usr.bin/clang/llvm-xray/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,4 @@ SRCS+= xray-graph.cpp
SRCS+= xray-registry.cpp
SRCS+= xray-stacks.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"
2 changes: 2 additions & 0 deletions usr.bin/clang/llvm.prog.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ LIBADD+= execinfo
LIBADD+= ncursesw
.endif
LIBADD+= pthread
LIBADD+= z
LIBADD+= zstd

.include <bsd.prog.mk>
3 changes: 0 additions & 3 deletions usr.bin/clang/opt/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ SRCS+= BreakpointPrinter.cpp
SRCS+= NewPMDriver.cpp
SRCS+= opt.cpp

LIBADD+= z
LIBADD+= zstd

.include "../llvm.prog.mk"

0 comments on commit ca54e5c

Please sign in to comment.