git: eb0de48b82b5 - main - devel/llvm-devel: update to a fresh snapshot

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Fri, 16 Sep 2022 12:43:59 UTC
The branch main has been updated by brooks:

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

commit eb0de48b82b59bfc46c3aca58d959076d5e51e92
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-09-16 12:43:55 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-09-16 12:43:55 +0000

    devel/llvm-devel: update to a fresh snapshot
    
    This update includes a switch to a new layout for
    runtime libraries.  Rather than being stored in
    llvm-devel/lib/clang/${LLVM_RELEASE}/lib/freebsd
    with -<arch> suffixes, they are now stored in
    llvm-devel/lib/clang/${LLVM_RELEASE}/lib/${CONFIGURE_TARGET}.
    In principle, the compiler should just use the new locations
    and this should be a no-op.
---
 devel/llvm-devel/Makefile          | 201 +++++++------------------------------
 devel/llvm-devel/Makefile.COMMANDS |   1 +
 devel/llvm-devel/Makefile.MAN1SRCS |   1 +
 devel/llvm-devel/Makefile.RUNTIMES | 173 +++++++++++++++++++++++++++++++
 devel/llvm-devel/Makefile.snapshot |   4 +-
 devel/llvm-devel/distinfo          |   6 +-
 devel/llvm-devel/pkg-plist         |  13 ++-
 7 files changed, 225 insertions(+), 174 deletions(-)

diff --git a/devel/llvm-devel/Makefile b/devel/llvm-devel/Makefile
index 2e6d0d8e0293..77b4d11bf92b 100644
--- a/devel/llvm-devel/Makefile
+++ b/devel/llvm-devel/Makefile
@@ -131,8 +131,8 @@ CLANG_USE=		PERL5=run
 .endif
 COMPILER_RT_DESC=	Sanitizer libraries
 COMPILER_RT_IMPLIES=	CLANG
-COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|} \
-			${_COMPILER_RT_IGNORELISTS:S|^|${_CRTBLDIR}/|}
+COMPILER_RT_PLIST_FILES=${COMPILER_RT_LIBS} \
+			${COMPILER_RT_IGNORELISTS:S|^|${_CRTBLDIR}/|}
 DOCS_PORTDOCS=		llvm
 DOCS_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx-markdown-tables>=0:textproc/py-sphinx-markdown-tables@${PY_FLAVOR} \
 			${PYTHON_PKGNAMEPREFIX}recommonmark>=0.0.20180530:textproc/py-recommonmark@${PY_FLAVOR}
@@ -304,180 +304,47 @@ CMAKE_BUILD_TYPE=	RelWithDebInfo
 STRIP=
 .endif
 
-_CRTLIBDIR=	${LLVM_DIR}/lib/clang/${LLVM_RELEASE}/lib/freebsd
-_CRTBLDIR=	${LLVM_DIR}/lib/clang/%%LLVM_RELEASE%%/share
-_COMPILER_RT_LIBS_i386= \
-	libclang_rt.asan-i386.a \
-	libclang_rt.asan-i386.so \
-	libclang_rt.asan-preinit-i386.a \
-	libclang_rt.asan_static-i386.a \
-	libclang_rt.asan_cxx-i386.a \
-	libclang_rt.builtins-i386.a \
-	libclang_rt.cfi-i386.a \
-	libclang_rt.cfi_diag-i386.a \
-	libclang_rt.profile-i386.a \
-	libclang_rt.safestack-i386.a \
-	libclang_rt.stats-i386.a \
-	libclang_rt.stats_client-i386.a \
-	libclang_rt.ubsan_minimal-i386.a \
-	libclang_rt.ubsan_minimal-i386.so \
-	libclang_rt.ubsan_standalone-i386.a \
-	libclang_rt.ubsan_standalone-i386.so \
-	libclang_rt.ubsan_standalone_cxx-i386.a
 .if ${ARCH} == "amd64"
-_COMPILER_RT_IGNORELISTS=	cfi_ignorelist.txt
-_COMPILER_RT_IGNORELISTS+=	asan_ignorelist.txt
-_COMPILER_RT_IGNORELISTS+=	msan_ignorelist.txt
-_COMPILER_RT_LIBS= \
-	libclang_rt.asan-preinit-x86_64.a \
-	libclang_rt.asan_static-x86_64.a \
-	libclang_rt.asan-x86_64.a \
-	libclang_rt.asan-x86_64.a.syms \
-	libclang_rt.asan-x86_64.so \
-	libclang_rt.asan_cxx-x86_64.a \
-	libclang_rt.asan_cxx-x86_64.a.syms \
-	libclang_rt.builtins-x86_64.a \
-	libclang_rt.cfi-x86_64.a \
-	libclang_rt.cfi_diag-x86_64.a \
-	libclang_rt.dd-x86_64.a \
-	libclang_rt.dyndd-x86_64.so \
-	libclang_rt.fuzzer-x86_64.a \
-	libclang_rt.fuzzer_interceptors-x86_64.a \
-	libclang_rt.fuzzer_no_main-x86_64.a \
-	libclang_rt.msan-x86_64.a \
-	libclang_rt.msan-x86_64.a.syms \
-	libclang_rt.msan_cxx-x86_64.a \
-	libclang_rt.msan_cxx-x86_64.a.syms \
-	libclang_rt.xray-basic-x86_64.a \
-	libclang_rt.xray-fdr-x86_64.a \
-	libclang_rt.xray-profiling-x86_64.a \
-	libclang_rt.xray-x86_64.a \
-	libclang_rt.orc-x86_64.a \
-	libclang_rt.profile-x86_64.a \
-	libclang_rt.safestack-x86_64.a \
-	libclang_rt.stats-x86_64.a \
-	libclang_rt.stats_client-x86_64.a \
-	libclang_rt.tsan-x86_64.a \
-	libclang_rt.tsan-x86_64.a.syms \
-	libclang_rt.tsan-x86_64.so \
-	libclang_rt.tsan_cxx-x86_64.a \
-	libclang_rt.tsan_cxx-x86_64.a.syms \
-	libclang_rt.ubsan_minimal-x86_64.a \
-	libclang_rt.ubsan_minimal-x86_64.a.syms \
-	libclang_rt.ubsan_minimal-x86_64.so \
-	libclang_rt.ubsan_standalone-x86_64.a \
-	libclang_rt.ubsan_standalone-x86_64.a.syms \
-	libclang_rt.ubsan_standalone-x86_64.so \
-	libclang_rt.ubsan_standalone_cxx-x86_64.a \
-	libclang_rt.ubsan_standalone_cxx-x86_64.a.syms
+COMPILER_RT_ARCHS=		x86_64
+COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
+COMPILER_RT_IGNORELISTS+=	cfi_ignorelist.txt
+COMPILER_RT_IGNORELISTS+=	msan_ignorelist.txt
 .if exists(/usr/lib32/libc.so.7)
-_COMPILER_RT_LIBS+=	${_COMPILER_RT_LIBS_i386}
+COMPILER_RT_ARCHS+=		i386
 .endif
 .elif ${ARCH} == "i386"
-_COMPILER_RT_IGNORELISTS=	cfi_ignorelist.txt
-_COMPILER_RT_IGNORELISTS+=	asan_ignorelist.txt
-_COMPILER_RT_LIBS+=	${_COMPILER_RT_LIBS_i386}
+COMPILER_RT_ARCHS=		i386
+COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
+COMPILER_RT_IGNORELISTS+=	cfi_ignorelist.txt
 .elif ${ARCH} == "powerpc"
-_COMPILER_RT_LIBS= \
-	libclang_rt.builtins-powerpc.a \
-	libclang_rt.profile-powerpc.a
+COMPILER_RT_ARCHS=		powerpc
 .elif ${ARCH} == "powerpc64"
-_COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
-_COMPILER_RT_IGNORELISTS+=	msan_ignorelist.txt
-_COMPILER_RT_LIBS= \
-	libclang_rt.asan-powerpc64.a \
-	libclang_rt.asan-powerpc64.a.syms \
-	libclang_rt.asan-powerpc64.so \
-	libclang_rt.asan-preinit-powerpc64.a \
-	libclang_rt.asan_cxx-powerpc64.a \
-	libclang_rt.asan_cxx-powerpc64.a.syms \
-	libclang_rt.asan_static-powerpc64.a \
-	libclang_rt.builtins-powerpc64.a \
-	libclang_rt.msan-powerpc64.a \
-	libclang_rt.msan-powerpc64.a.syms \
-	libclang_rt.msan_cxx-powerpc64.a \
-	libclang_rt.msan_cxx-powerpc64.a.syms \
-	libclang_rt.profile-powerpc64.a \
-	libclang_rt.stats-powerpc64.a \
-	libclang_rt.stats_client-powerpc64.a \
-	libclang_rt.tsan-powerpc64.a \
-	libclang_rt.tsan-powerpc64.a.syms \
-	libclang_rt.tsan-powerpc64.so \
-	libclang_rt.tsan_cxx-powerpc64.a \
-	libclang_rt.tsan_cxx-powerpc64.a.syms \
-	libclang_rt.ubsan_minimal-powerpc64.a \
-	libclang_rt.ubsan_minimal-powerpc64.a.syms \
-	libclang_rt.ubsan_minimal-powerpc64.so \
-	libclang_rt.ubsan_standalone-powerpc64.a \
-	libclang_rt.ubsan_standalone-powerpc64.a.syms \
-	libclang_rt.ubsan_standalone-powerpc64.so \
-	libclang_rt.ubsan_standalone_cxx-powerpc64.a \
-	libclang_rt.ubsan_standalone_cxx-powerpc64.a.syms
+COMPILER_RT_ARCHS=		powerpc64
 .if exists(/usr/lib32/libc.so.7)
-_COMPILER_RT_LIBS+= \
-	libclang_rt.builtins-powerpc.a \
-	libclang_rt.profile-powerpc.a
+COMPILER_RT_ARCHS+=		powerpc
 .endif
+COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
+COMPILER_RT_IGNORELISTS+=	msan_ignorelist.txt
 .elif ${ARCH} == "powerpc64le"
-_COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
-_COMPILER_RT_IGNORELISTS+=	msan_ignorelist.txt
-_COMPILER_RT_LIBS= \
-	libclang_rt.asan-powerpc64le.a \
-	libclang_rt.asan-powerpc64le.a.syms \
-	libclang_rt.asan-powerpc64le.so \
-	libclang_rt.asan-preinit-powerpc64le.a \
-	libclang_rt.asan_cxx-powerpc64le.a \
-	libclang_rt.asan_cxx-powerpc64le.a.syms \
-	libclang_rt.asan_static-powerpc64le.a \
-	libclang_rt.builtins-powerpc64le.a \
-	libclang_rt.msan-powerpc64le.a \
-	libclang_rt.msan-powerpc64le.a.syms \
-	libclang_rt.msan_cxx-powerpc64le.a \
-	libclang_rt.msan_cxx-powerpc64le.a.syms \
-	libclang_rt.profile-powerpc64le.a \
-	libclang_rt.stats-powerpc64le.a \
-	libclang_rt.stats_client-powerpc64le.a \
-	libclang_rt.tsan-powerpc64le.a \
-	libclang_rt.tsan-powerpc64le.a.syms \
-	libclang_rt.tsan-powerpc64le.so \
-	libclang_rt.tsan_cxx-powerpc64le.a \
-	libclang_rt.tsan_cxx-powerpc64le.a.syms \
-	libclang_rt.ubsan_minimal-powerpc64le.a \
-	libclang_rt.ubsan_minimal-powerpc64le.a.syms \
-	libclang_rt.ubsan_minimal-powerpc64le.so \
-	libclang_rt.ubsan_standalone-powerpc64le.a \
-	libclang_rt.ubsan_standalone-powerpc64le.a.syms \
-	libclang_rt.ubsan_standalone-powerpc64le.so \
-	libclang_rt.ubsan_standalone_cxx-powerpc64le.a \
-	libclang_rt.ubsan_standalone_cxx-powerpc64le.a.syms \
-	libclang_rt.xray-basic-powerpc64le.a \
-	libclang_rt.xray-fdr-powerpc64le.a \
-	libclang_rt.xray-powerpc64le.a \
-	libclang_rt.xray-profiling-powerpc64le.a
+COMPILER_RT_ARCHS=		powerpc64le
+COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
+COMPILER_RT_IGNORELISTS+=	msan_ignorelist.txt
 .elif ${ARCH} == "riscv64"
-_COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
-_COMPILER_RT_LIBS= \
-	libclang_rt.asan-preinit-riscv64.a \
-	libclang_rt.asan-riscv64.a \
-	libclang_rt.asan-riscv64.a.syms \
-	libclang_rt.asan-riscv64.so \
-	libclang_rt.asan_cxx-riscv64.a \
-	libclang_rt.asan_cxx-riscv64.a.syms \
-	libclang_rt.asan_static-riscv64.a \
-	libclang_rt.builtins-riscv64.a \
-	libclang_rt.profile-riscv64.a \
-	libclang_rt.stats-riscv64.a \
-	libclang_rt.stats_client-riscv64.a \
-	libclang_rt.ubsan_minimal-riscv64.a \
-	libclang_rt.ubsan_minimal-riscv64.a.syms \
-	libclang_rt.ubsan_minimal-riscv64.so \
-	libclang_rt.ubsan_standalone-riscv64.a \
-	libclang_rt.ubsan_standalone-riscv64.a.syms \
-	libclang_rt.ubsan_standalone-riscv64.so \
-	libclang_rt.ubsan_standalone_cxx-riscv64.a \
-	libclang_rt.ubsan_standalone_cxx-riscv64.a.syms
+COMPILER_RT_ARCHS=		riscv64
+COMPILER_RT_IGNORELISTS=	asan_ignorelist.txt
 .endif
 
+_CRTBASEDIR=	${LLVM_DIR}/lib/clang/${LLVM_RELEASE}
+_CRTBLDIR=	${_CRTBASEDIR}/share
+_CRTLIBDIR=	${_CRTBASEDIR}/lib
+
+.include "Makefile.RUNTIMES"
+
+COMPILER_RT_LIBS=
+.for CRT_ARCH in ${COMPILER_RT_ARCHS}
+COMPILER_RT_LIBS:= ${COMPILER_RT_LIBS} ${COMPILER_RT_LIBS_${CRT_ARCH}:S|^|${_CRTLIBDIR}/${CRT_ARCH}-portbld-${OPSYS:tl}${OSREL}/|}
+.endfor
+
 # Comment out plist entries for unsupported options.
 .for opt in ${_ALL_OPTIONS}
 .if !${OPTIONS_DEFINE:M${opt}}
@@ -552,7 +419,7 @@ post-install-FLANG-on:
 	${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/include/flang/Optimizer/Transforms/CMakeFiles
 	${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/include/flang/Optimizer/CMakeFiles
 	${RMDIR} ${STAGEDIR}${LLVM_PREFIX}/include/flang/CMakeFiles
-.if ${SNAPDATE} == 20220906
+.if ${SNAPDATE} == 20220915
 	# expected to be temporary
 	${LN} -f ${STAGEDIR}${LLVM_PREFIX}/bin/flang-new \
 	    ${STAGEDIR}${LLVM_PREFIX}/bin/flang
@@ -620,7 +487,7 @@ build-plist:
 	    ${SORT} >> ${PLIST}.tmp
 	awk '{ \
 	    if ($$0 ~ /lib.lib[a-zA-Z].*\.a$$/) {printf "%%%%STATIC_LIBS%%%%"} \
-	    if ($$0 ~ /${CLANG_PATTERN}/ && $$0 !~ /${OPENMP_PATTERN}|${EXTRAS_PATTERN}|${COMPILER_RT_PATTERN}|libclang_rt/) {printf "%%%%CLANG%%%%"} \
+	    if ($$0 ~ /${CLANG_PATTERN}/ && $$0 !~ /${OPENMP_PATTERN}|${EXTRAS_PATTERN}|${COMPILER_RT_PATTERN}|lib[a-z]*_rt/) {printf "%%%%CLANG%%%%"} \
 	    if ($$0 ~ /${COMPILER_RT_PATTERN}/) \
 		{printf "%%%%COMPILER_RT%%%%"} \
 	    if ($$0 ~ /(bin\/(ld|lld|wasm-ld))|liblld[^b]|\/lld\// && $$0 !~ /lldb/) {printf "%%%%LLD%%%%"} \
@@ -630,7 +497,7 @@ build-plist:
 	    if ($$0 ~ /(${MLIR_PATTERN})/) {printf "%%%%MLIR%%%%"} \
 	    if ($$0 ~ /(${OPENMP_PATTERN})/) {printf "%%%%OPENMP%%%%"} \
 	    if ($$0 ~ /LLVMgold/) {printf "%%%%GOLD%%%%"} \
-	    if ($$0 !~ /libclang_rt/) {print} \
+	    if ($$0 !~ /lib[a-z]*_rt/) {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/Makefile.COMMANDS b/devel/llvm-devel/Makefile.COMMANDS
index 25d4838afc3e..9d46d404801c 100644
--- a/devel/llvm-devel/Makefile.COMMANDS
+++ b/devel/llvm-devel/Makefile.COMMANDS
@@ -49,6 +49,7 @@ LLVM_COMMANDS=	\
 		llvm-readobj \
 		llvm-reduce \
 		llvm-remark-size-diff \
+		llvm-remarkutil \
 		llvm-rtdyld \
 		llvm-sim \
 		llvm-size \
diff --git a/devel/llvm-devel/Makefile.MAN1SRCS b/devel/llvm-devel/Makefile.MAN1SRCS
index 7601048dcb7a..300d2621a4bd 100644
--- a/devel/llvm-devel/Makefile.MAN1SRCS
+++ b/devel/llvm-devel/Makefile.MAN1SRCS
@@ -38,6 +38,7 @@ LLVM_MAN1SRCS= \
 	llvm-readelf.1 \
 	llvm-readobj.1 \
 	llvm-remark-size-diff.1 \
+	llvm-remarkutil.1 \
 	llvm-size.1 \
 	llvm-stress.1 \
 	llvm-strings.1 \
diff --git a/devel/llvm-devel/Makefile.RUNTIMES b/devel/llvm-devel/Makefile.RUNTIMES
new file mode 100644
index 000000000000..fb5360dd6f1c
--- /dev/null
+++ b/devel/llvm-devel/Makefile.RUNTIMES
@@ -0,0 +1,173 @@
+# Makefile.RUNTIMES
+#
+# LIBCLANG_RT_LIBS_<arch> - clang runtime files (actual name prefixed with
+# "libclang_rt." (e.g., asan.a -> libclang_rt.asan.a).
+#
+# RT_LIBS_<arch> - full name of other runtimes.
+
+RT_ARCHES=
+
+RT_ARCHES+=i386
+LIBCLANG_RT_LIBS_i386= \
+	asan.a \
+	asan.so \
+	asan-preinit.a \
+	asan_static.a \
+	asan_cxx.a \
+	builtins.a \
+	cfi.a \
+	cfi_diag.a \
+	profile.a \
+	safestack.a \
+	stats.a \
+	stats_client.a \
+	ubsan_minimal.a \
+	ubsan_minimal.so \
+	ubsan_standalone.a \
+	ubsan_standalone.so \
+	ubsan_standalone_cxx.a
+
+RT_ARCHES+=powerpc
+LIBCLANG_RT_LIBS_powerpc= \
+	builtins-powerpc.a \
+	profile-powerpc.a
+
+RT_ARCHES+=powerpc64
+LIBCLANG_RT_LIBS_powerpc64= \
+	asan.a \
+	asan.a.syms \
+	asan.so \
+	asan-preinit.a \
+	asan_cxx.a \
+	asan_cxx.a.syms \
+	asan_static.a \
+	builtins.a \
+	msan.a \
+	msan.a.syms \
+	msan_cxx.a \
+	msan_cxx.a.syms \
+	profile.a \
+	stats.a \
+	stats_client.a \
+	tsan.a \
+	tsan.a.syms \
+	tsan.so \
+	tsan_cxx.a \
+	tsan_cxx.a.syms \
+	ubsan_minimal.a \
+	ubsan_minimal.a.syms \
+	ubsan_minimal.so \
+	ubsan_standalone.a \
+	ubsan_standalone.a.syms \
+	ubsan_standalone.so \
+	ubsan_standalone_cxx.a \
+	ubsan_standalone_cxx.a.syms
+
+RT_ARCHES+=powerpc64le
+LIBCLANG_RT_LIBS_powerpc64le= \
+	asan.a \
+	asan.a.syms \
+	asan.so \
+	asan-preinit.a \
+	asan_cxx.a \
+	asan_cxx.a.syms \
+	asan_static.a \
+	builtins.a \
+	msan.a \
+	msan.a.syms \
+	msan_cxx.a \
+	msan_cxx.a.syms \
+	profile.a \
+	stats.a \
+	stats_client.a \
+	tsan.a \
+	tsan.a.syms \
+	tsan.so \
+	tsan_cxx.a \
+	tsan_cxx.a.syms \
+	ubsan_minimal.a \
+	ubsan_minimal.a.syms \
+	ubsan_minimal.so \
+	ubsan_standalone.a \
+	ubsan_standalone.a.syms \
+	ubsan_standalone.so \
+	ubsan_standalone_cxx.a \
+	ubsan_standalone_cxx.a.syms \
+	xray-basic.a \
+	xray-fdr.a \
+	xray.a \
+	xray-profiling.a
+
+RT_ARCHES+=riscv64
+LIBCLANG_RT_LIBS_riscv64= \
+	asan-preinit.a \
+	asan.a \
+	asan.a.syms \
+	asan.so \
+	asan_cxx.a \
+	asan_cxx.a.syms \
+	asan_static.a \
+	builtins.a \
+	profile.a \
+	stats.a \
+	stats_client.a \
+	ubsan_minimal.a \
+	ubsan_minimal.a.syms \
+	ubsan_minimal.so \
+	ubsan_standalone.a \
+	ubsan_standalone.a.syms \
+	ubsan_standalone.so \
+	ubsan_standalone_cxx.a \
+	ubsan_standalone_cxx.a.syms
+
+RT_ARCHES+=x86_64
+LIBCLANG_RT_LIBS_x86_64= \
+	asan-preinit.a \
+	asan_static.a \
+	asan.a \
+	asan.a.syms \
+	asan.so \
+	asan_cxx.a \
+	asan_cxx.a.syms \
+	builtins.a \
+	cfi.a \
+	cfi_diag.a \
+	dd.a \
+	dyndd.so \
+	fuzzer.a \
+	fuzzer_interceptors.a \
+	fuzzer_no_main.a \
+	msan.a \
+	msan.a.syms \
+	msan_cxx.a \
+	msan_cxx.a.syms \
+	xray-basic.a \
+	xray-fdr.a \
+	xray-profiling.a \
+	xray.a \
+	profile.a \
+	safestack.a \
+	stats.a \
+	stats_client.a \
+	tsan.a \
+	tsan.a.syms \
+	tsan.so \
+	tsan_cxx.a \
+	tsan_cxx.a.syms \
+	ubsan_minimal.a \
+	ubsan_minimal.a.syms \
+	ubsan_minimal.so \
+	ubsan_standalone.a \
+	ubsan_standalone.a.syms \
+	ubsan_standalone.so \
+	ubsan_standalone_cxx.a \
+	ubsan_standalone_cxx.a.syms
+RT_LIBS_x86_64= liborc_rt.a
+
+.for CRT_ARCH in ${RT_ARCHES}
+COMPILER_RT_LIBS_${CRT_ARCH}:=${LIBCLANG_RT_LIBS_${CRT_ARCH}:S|^|libclang_rt.|}
+.ifdef RT_LIBS_${CRT_ARCH}
+COMPILER_RT_LIBS_${CRT_ARCH}:= ${COMPILER_RT_LIBS_${CRT_ARCH}} ${RT_LIBS_${CRT_ARCH}}
+.endif
+.endfor
+
diff --git a/devel/llvm-devel/Makefile.snapshot b/devel/llvm-devel/Makefile.snapshot
index 193a429c9880..75706f151ff5 100644
--- a/devel/llvm-devel/Makefile.snapshot
+++ b/devel/llvm-devel/Makefile.snapshot
@@ -4,6 +4,6 @@
 #
 LLVM_MAJOR=	16
 LLVM_RELEASE=	${LLVM_MAJOR}.0.0
-SNAPDATE=	20220906
+SNAPDATE=	20220915
 
-LLVM_PROJECT_COMMIT=		ae60a4a0efff337425638d04005b33a73dc5792f
+LLVM_PROJECT_COMMIT=		5279e11f063db6a0cc87ccf9e0e1c7b1b31aa7cf
diff --git a/devel/llvm-devel/distinfo b/devel/llvm-devel/distinfo
index 4234aa7cbabd..21deae4375d9 100644
--- a/devel/llvm-devel/distinfo
+++ b/devel/llvm-devel/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1662495113
-SHA256 (llvm-llvm-project-16.0.d20220906-ae60a4a0efff337425638d04005b33a73dc5792f_GH0.tar.gz) = be1dcd4a18ecf1c4be36b99b242633472bb556c3280600e20da9b447ae0c7b2f
-SIZE (llvm-llvm-project-16.0.d20220906-ae60a4a0efff337425638d04005b33a73dc5792f_GH0.tar.gz) = 167004177
+TIMESTAMP = 1663234773
+SHA256 (llvm-llvm-project-16.0.d20220915-5279e11f063db6a0cc87ccf9e0e1c7b1b31aa7cf_GH0.tar.gz) = 2eeb504e3b5b4f25674b95b8288513927f07c0ca701c6e2f69734a0dd2898737
+SIZE (llvm-llvm-project-16.0.d20220915-5279e11f063db6a0cc87ccf9e0e1c7b1b31aa7cf_GH0.tar.gz) = 167351634
diff --git a/devel/llvm-devel/pkg-plist b/devel/llvm-devel/pkg-plist
index 9a7fa228d481..755137ac842d 100644
--- a/devel/llvm-devel/pkg-plist
+++ b/devel/llvm-devel/pkg-plist
@@ -50,6 +50,7 @@ bin/llvm-readelf-devel
 bin/llvm-readobj-devel
 bin/llvm-reduce-devel
 bin/llvm-remark-size-diff-devel
+bin/llvm-remarkutil-devel
 bin/llvm-rtdyld-devel
 bin/llvm-sim-devel
 bin/llvm-size-devel
@@ -259,6 +260,7 @@ llvm-devel/bin/llvm-readelf
 llvm-devel/bin/llvm-readobj
 llvm-devel/bin/llvm-reduce
 llvm-devel/bin/llvm-remark-size-diff
+llvm-devel/bin/llvm-remarkutil
 llvm-devel/bin/llvm-rtdyld
 llvm-devel/bin/llvm-sim
 llvm-devel/bin/llvm-size
@@ -751,6 +753,7 @@ llvm-devel/bin/verify-uselistorder
 %%CLANG%%llvm-devel/include/clang/AST/NSAPI.h
 %%CLANG%%llvm-devel/include/clang/AST/NestedNameSpecifier.h
 %%CLANG%%llvm-devel/include/clang/AST/NonTrivialTypeVisitor.h
+%%CLANG%%llvm-devel/include/clang/AST/ODRDiagsEmitter.h
 %%CLANG%%llvm-devel/include/clang/AST/ODRHash.h
 %%CLANG%%llvm-devel/include/clang/AST/OSLog.h
 %%CLANG%%llvm-devel/include/clang/AST/OpenMPClause.h
@@ -2452,7 +2455,6 @@ llvm-devel/include/llvm/CodeGen/DebugHandlerBase.h
 llvm-devel/include/llvm/CodeGen/DwarfStringPoolEntry.h
 llvm-devel/include/llvm/CodeGen/EdgeBundles.h
 llvm-devel/include/llvm/CodeGen/ExecutionDomainFix.h
-llvm-devel/include/llvm/CodeGen/ExpandLargeDivRem.h
 llvm-devel/include/llvm/CodeGen/ExpandReductions.h
 llvm-devel/include/llvm/CodeGen/ExpandVectorPredication.h
 llvm-devel/include/llvm/CodeGen/FastISel.h
@@ -3081,6 +3083,8 @@ llvm-devel/include/llvm/IR/IntrinsicsDirectX.td
 llvm-devel/include/llvm/IR/IntrinsicsHexagon.h
 llvm-devel/include/llvm/IR/IntrinsicsHexagon.td
 llvm-devel/include/llvm/IR/IntrinsicsHexagonDep.td
+llvm-devel/include/llvm/IR/IntrinsicsLoongArch.h
+llvm-devel/include/llvm/IR/IntrinsicsLoongArch.td
 llvm-devel/include/llvm/IR/IntrinsicsMips.h
 llvm-devel/include/llvm/IR/IntrinsicsMips.td
 llvm-devel/include/llvm/IR/IntrinsicsNVPTX.h
@@ -3708,6 +3712,7 @@ llvm-devel/include/llvm/Transforms/Instrumentation/MemProfiler.h
 llvm-devel/include/llvm/Transforms/Instrumentation/MemorySanitizer.h
 llvm-devel/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h
 llvm-devel/include/llvm/Transforms/Instrumentation/PoisonChecking.h
+llvm-devel/include/llvm/Transforms/Instrumentation/SanitizerBinaryMetadata.h
 llvm-devel/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
 llvm-devel/include/llvm/Transforms/Instrumentation/ThreadSanitizer.h
 llvm-devel/include/llvm/Transforms/ObjCARC.h
@@ -4106,6 +4111,7 @@ llvm-devel/include/llvm/XRay/YAMLXRayRecord.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Arithmetic/Transforms/Passes.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Arithmetic/Transforms/Passes.h.inc
 %%MLIR%%llvm-devel/include/mlir/Dialect/Arithmetic/Transforms/Passes.td
+%%MLIR%%llvm-devel/include/mlir/Dialect/Arithmetic/Transforms/WideIntEmulationConverter.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Arithmetic/Utils/Utils.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/ArmNeon/ArmNeon.cpp.inc
 %%MLIR%%llvm-devel/include/mlir/Dialect/ArmNeon/ArmNeon.h.inc
@@ -4595,6 +4601,7 @@ llvm-devel/include/llvm/XRay/YAMLXRayRecord.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Tensor/Transforms/Passes.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Tensor/Transforms/Passes.h.inc
 %%MLIR%%llvm-devel/include/mlir/Dialect/Tensor/Transforms/Passes.td
+%%MLIR%%llvm-devel/include/mlir/Dialect/Tensor/Transforms/TransformUtils.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Tensor/Transforms/Transforms.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Tensor/Utils/Utils.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Tosa/IR/TosaAttributes.cpp.inc
@@ -4651,6 +4658,8 @@ llvm-devel/include/llvm/XRay/YAMLXRayRecord.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOps.h
 %%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOps.h.inc
 %%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOps.td
+%%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOpsAttrDefs.cpp.inc
+%%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOpsAttrDefs.h.inc
 %%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOpsDialect.cpp.inc
 %%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOpsDialect.h.inc
 %%MLIR%%llvm-devel/include/mlir/Dialect/Vector/IR/VectorOpsEnums.cpp.inc
@@ -4959,7 +4968,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
-%%OPENMP%%llvm-devel/include/ompt-multiplex.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
@@ -5075,6 +5083,7 @@ llvm-devel/include/llvm/XRay/YAMLXRayRecord.h
 %%CLANG%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/nmmintrin.h
 %%OPENMP%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/omp-tools.h
 %%OPENMP%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/omp.h
+%%OPENMP%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/ompt-multiplex.h
 %%OPENMP%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/ompt.h
 %%CLANG%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/opencl-c-base.h
 %%CLANG%%llvm-devel/lib/clang/%%LLVM_RELEASE%%/include/opencl-c.h