Date: Tue, 18 Apr 2023 19:30:09 GMT From: Brooks Davis <brooks@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org Subject: git: 5af6b0969512 - 2023Q2 - devel/llvm16: add a lite FLAVOR Message-ID: <202304181930.33IJU9sN017380@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch 2023Q2 has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=5af6b09695121e83557cd79557077c75d3710f5f commit 5af6b09695121e83557cd79557077c75d3710f5f Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2023-04-18 19:29:57 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2023-04-18 19:29:57 +0000 devel/llvm16: add a lite FLAVOR The lite flavor is for when you just need a FreeBSD compiler (e.g., in CI). By default it includes CLANG and LLD as well as backends required for FreeBSD and FreeBSD ports (BE_NATIVE, BE_AMDGPU, and BE_WASM). The lite install is ~350GiB on amd64 vs ~1.9GiB for default and it has only a single dependency (zstandard). (The goal was no dependencies, but libzstd is a private lib in base.) Due to 16.0.1 support being merged without predecessors the resulting packages have a version (16.0.1_1) that has not (yet) appeared in main. Hopefully they will resync when 16.0.2 is released. Sponsored by: DARPA (cherry picked from commit 003b969feea21d4759a4c87815c843f0b6ebbf8f) --- devel/llvm16/Makefile | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/devel/llvm16/Makefile b/devel/llvm16/Makefile index aea3e33bc76e..b7708473312b 100644 --- a/devel/llvm16/Makefile +++ b/devel/llvm16/Makefile @@ -1,6 +1,6 @@ PORTNAME= llvm DISTVERSION= 16.0.1 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= devel lang MASTER_SITES= https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \ https://${PRE_}releases.llvm.org/${LLVM_RELEASE}${RCDIR}/ @@ -23,6 +23,10 @@ LICENSE:= ${LICENSE:NARM} LIB_DEPENDS= libzstd.so:archivers/zstd +FLAVORS= default lite +FLAVOR?= ${FLAVORS:[1]} +lite_PKGNAMESUFFIX= ${LLVM_SUFFIX}-lite + LLVM_RELEASE= ${DISTVERSION:C/rc.*//} LLVM_MAJOR= ${LLVM_RELEASE:C/\.[0-9]\.[0-9]$//} LLVM_SUFFIX= ${LLVM_MAJOR} @@ -34,7 +38,7 @@ LLVM_PREFIX= ${PREFIX}/${LLVM_DIR} DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${LLVM_SUFFIX} DATADIR= ${PREFIX}/share/${PORTNAME}${LLVM_SUFFIX} -USES= cmake compiler:c++17-lang cpe perl5 tar:xz \ +USES= cmake compiler:c++17-lang cpe tar:xz \ shebangfix _USES_PYTHON?= python:3.6+,build USES+= ${_USES_PYTHON} @@ -76,6 +80,7 @@ CMAKE_ARGS+= -DLLVM_HOST_TRIPLE=${CONFIGURE_TARGET} CMAKE_ARGS+= -DCMAKE_INSTALL_MANDIR:PATH="share/man" CMAKE_ARGS+= -DLLVM_PARALLEL_LINK_JOBS=1 CMAKE_ARGS+= -DLLVM_ENABLE_Z3_SOLVER=OFF +CMAKE_ARGS+= -DLLVM_ENABLE_LIBXML2=OFF CMAKE_ARGS+= -DLLVM_ENABLE_LIBEDIT=OFF CMAKE_ARGS+= -DPython3_EXECUTABLE=${PYTHON_CMD} # LLVM likes to pick up ${LOCALBASE}/lib/libtinfo.so.* @@ -86,25 +91,37 @@ CMAKE_ARGS+= -DLLVM_ENABLE_TERMINFO=OFF CFLAGS+= -DNDEBUG CXXFLAGS+= -DNDEBUG -OPTIONS_DEFINE= BE_AMDGPU BE_WASM CLANG COMPILER_RT DOCS EXTRAS FLANG LIT LLD LLDB MLIR OPENMP PYCLANG STATIC_LIBS +OPTIONS_DEFINE= BE_AMDGPU BE_WASM CLANG COMPILER_RT DOCS LLD STATIC_LIBS +OPTIONS_DEFAULT= BE_AMDGPU BE_WASM CLANG LLD +OPTIONS_SINGLE= BACKENDS +OPTIONS_SINGLE_BACKENDS=BE_FREEBSD BE_NATIVE BE_STANDARD +OPTIONS_EXCLUDE_armv6= COMPILER_RT +OPTIONS_EXCLUDE_armv7= COMPILER_RT +OPTIONS_SUB= yes + +.if ${FLAVOR:Mlite} +OPTIONS_DEFAULT+= BE_NATIVE +.else +OPTIONS_DEFINE+= EXTRAS FLANG LIT LLDB MLIR OPENMP PYCLANG OPTIONS_DEFINE_amd64= GOLD OPTIONS_DEFINE_powerpc= GOLD OPTIONS_DEFINE_powerpc64= GOLD OPTIONS_DEFINE_powerpc64le= GOLD -OPTIONS_DEFAULT= BE_AMDGPU BE_STANDARD BE_WASM CLANG COMPILER_RT EXTRAS LIT LLD LLDB MLIR OPENMP PYCLANG STATIC_LIBS + +OPTIONS_DEFAULT+= BE_STANDARD COMPILER_RT EXTRAS LIT LLDB MLIR OPENMP PYCLANG STATIC_LIBS OPTIONS_DEFAULT_amd64= GOLD OPTIONS_DEFAULT_powerpc= GOLD OPTIONS_DEFAULT_powerpc64= GOLD OPTIONS_DEFAULT_powerpc64le= GOLD -OPTIONS_EXCLUDE_armv6= COMPILER_RT FLANG OPENMP -OPTIONS_EXCLUDE_armv7= COMPILER_RT FLANG OPENMP + +OPTIONS_EXCLUDE_armv6+= FLANG OPENMP +OPTIONS_EXCLUDE_armv7+= FLANG OPENMP OPTIONS_EXCLUDE_i386= FLANG OPENMP OPTIONS_EXCLUDE_powerpc= FLANG OPENMP OPTIONS_EXCLUDE_riscv64= LLDB OPTIONS_EXCLUDE_FreeBSD_12= OPENMP -OPTIONS_SINGLE= BACKENDS -OPTIONS_SINGLE_BACKENDS=BE_FREEBSD BE_NATIVE BE_STANDARD -OPTIONS_SUB= yes +.endif + # All non-backend options _ALL_OPTIONS= CLANG COMPILER_RT DOCS EXTRAS FLANG GOLD LIT LLD LLDB MLIR OPENMP PYCLANG STATIC_LIBS @@ -129,7 +146,11 @@ CLANG_SUB_LIST= XCC=clang${LLVM_SUFFIX} \ XCPP=clang-cpp${LLVM_SUFFIX} \ XLD=ld.lld${LLVM_SUFFIX} \ X_COMPILER_TYPE=clang -CLANG_USE= GNOME=libxml2 +CLANG_USES= perl5 +.if ${FLAVOR:Mlite} +# scan-build does require perl, but lite users can install it manually. +CLANG_USE= PERL5=build +.endif COMPILER_RT_DESC= Sanitizer libraries COMPILER_RT_CMAKE_ON= -DCOMPILER_RT_INSTALL_PATH=${LLVM_PREFIX}/lib/clang/${LLVM_RELEASE} COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS} @@ -179,6 +200,8 @@ PYCLANG_VARS= _USES_PYTHON=python:3.6+ PYCLANG_CMAKE_ON= -DCLANG_PYTHON_BINDINGS_VERSIONS=${PYTHON_VER} STATIC_LIBS_DESC= Install static libraries (does not effect sanitizers) +CONFLICTS_INSTALL= ${PORTNAME}${LLVM_SUFFIX} ${PORTNAME}${LLVM_SUFFIX}-lite + .if defined(WITH_DEBUG) CMAKE_BUILD_TYPE= RelWithDebInfo STRIP=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304181930.33IJU9sN017380>