git: 38c131e44225 - main - devel/llvm-devel: use PLIST_FILES for GOLD (NFC)

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Thu, 29 Sep 2022 22:48:47 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/ports/commit/?id=38c131e442256c38b219a93018d0ff28f2c3bac7

commit 38c131e442256c38b219a93018d0ff28f2c3bac7
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-09-29 22:48:40 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-09-29 22:48:40 +0000

    devel/llvm-devel: use PLIST_FILES for GOLD (NFC)
    
    The GOLD option causes a single file to be built so move it to
    GOLD_PLIST_FILES and exclude it from the generated pkg-plist.  This
    simplifies doing port maintenance on aarch64 systems were we don't
    currently build the gold plugin.
---
 devel/llvm-devel/Makefile  | 4 ++--
 devel/llvm-devel/pkg-plist | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/devel/llvm-devel/Makefile b/devel/llvm-devel/Makefile
index 518482e532e9..44dfdb56e7fe 100644
--- a/devel/llvm-devel/Makefile
+++ b/devel/llvm-devel/Makefile
@@ -166,6 +166,7 @@ STATIC_LIBS_DESC=	Install static libraries (does not effect sanitizers)
 GOLD_DESC=		Build the LLVM Gold plugin for LTO
 GOLD_CMAKE_ON=		-DLLVM_BINUTILS_INCDIR=${LOCALBASE}/include
 GOLD_BUILD_DEPENDS=	${LOCALBASE}/bin/ld.gold:devel/binutils
+GOLD_PLIST_FILES=	${LLVM_DIR}/lib/LLVMgold.so
 
 CONFLICTS_INSTALL=	llvm-devel llvm-devel-lite
 
@@ -501,8 +502,7 @@ build-plist:
 	    if ($$0 ~ /(argdumper|lldb|six.py)/) {printf "%%%%LLDB%%%%"} \
 	    if ($$0 ~ /(${MLIR_PATTERN})/) {printf "%%%%MLIR%%%%"} \
 	    if ($$0 ~ /(${OPENMP_PATTERN})/) {printf "%%%%OPENMP%%%%"} \
-	    if ($$0 ~ /LLVMgold/) {printf "%%%%GOLD%%%%"} \
-	    if ($$0 !~ /lib[a-z]*_rt/) {print} \
+	    if ($$0 !~ /(lib[a-z]*_rt|LLVMgold)/) {print} \
 	}' ${PLIST}.tmp >> ${PLIST}
 	${ECHO_CMD} '@postexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi' >> ${PLIST}
 	${ECHO_CMD} '@postunexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi' >> ${PLIST}
diff --git a/devel/llvm-devel/pkg-plist b/devel/llvm-devel/pkg-plist
index 7655d7391a58..64445d660574 100644
--- a/devel/llvm-devel/pkg-plist
+++ b/devel/llvm-devel/pkg-plist
@@ -4966,7 +4966,6 @@ llvm-devel/include/llvm/XRay/YAMLXRayRecord.h
 %%MLIR%%llvm-devel/include/mlir/Transforms/Transforms.capi.cpp.inc
 %%MLIR%%llvm-devel/include/mlir/Transforms/Transforms.capi.h.inc
 %%MLIR%%llvm-devel/include/mlir/Transforms/ViewOpGraph.h
-%%GOLD%%llvm-devel/lib/LLVMgold.so
 %%CLANG%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/__clang_cuda_builtin_vars.h
 %%CLANG%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/__clang_cuda_cmath.h
 %%CLANG%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/__clang_cuda_complex_builtins.h