From nobody Sun Apr 02 02:23:50 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PpyWW18lZz43lc9; Sun, 2 Apr 2023 02:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PpyWW0343z3Q4q; Sun, 2 Apr 2023 02:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680402231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EolgyGy1e0J7Y975a2OsVsE0JgW5PFDm5o4nZMVijc=; b=lUCtqeGFyNaLIBFBQxrvzrcqv4N2HFKH4uxBLQPqNGWqYGieyyW7LxqrC19kSX1HAQ0zl+ IaO+uTr+EDcIOo9GRkMJluLH7BhJtp1InfWrqe5TViw1n4O92wdin9JBOem//dJLSnftbc igT1CcBfp06JtnuIiTXUyIdQHF9aq+IxCYebwPyJciq1MLVqQbhHKdvULuEhAI8uWC3DXk rwcYgpLMuklGGk8mecPYy7jdp2WAWr8pNolajoxrkdPEqsb6iI3urKCDh0ik/+hpsFpMFe VizpLvkuvPLwu39uXhvd88Tj6kO0XUAsQ9knTgG/dq8Cxf1wHL4Ei4ox0I4Bhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680402231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3EolgyGy1e0J7Y975a2OsVsE0JgW5PFDm5o4nZMVijc=; b=ethBmh3vVbkWqf3lGnwBbqUIp7HDWEhGC0cNJvK+j6Je8o9xAdjGQMwzMW3E7yp1IkQPGj 19RGXvNEQKeaMXKEv8bvPpoHzmCcpbU9pgLqzJoPIVmImj7x50xxh+w+imxHjcwXOVplc5 DiHoVmpxZzCbqhwhvaOvmYwlZaGg6851eebQIFo2EJttMU+KJEzbckfB9FaG+AAcaIVi06 I7P9Xj2QZnXTN8kkVnRmKu+ubo/FGe6yiHM8aABpyMGbLBnCh2f1ekHPVELff2/sm1Y7Ln 18/agwMNqAFKDyz/P8/Nko72BOGB0rkX1UYKds4NbZmLKZ44VciU6pb+1ej9uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680402231; a=rsa-sha256; cv=none; b=Y3RECe2UiDOX7C5kd9UT/piTUfPorxTAIU7YCgZX2hTbNOf7AIcF+d2C5oOPC2mTKx9QlZ ML6V51UitwX1mYe05bvz2AlQmI55hUE95GqWH/R5ITs4jzLUbvy5OSQfFF2WKsntNoARoO 15SrwPXLLRauLeSKgfjlrNyQv5cokmHr/MI8PCHnvWK/ad6Lz2v2FzWlssJvSIEOGn92ED 6S+lvcorLhbxT7kd4i7kOtf3akaSHcDGhQhJ/caveaA4uRxgOKHoBuEAJe9vkzNxTHm48K Se9SU/TRLEDPM4R9iZI5CENxPXlCx1sC8EC3MLBYIA9YMhlIak5CR5A67cZrBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PpyWV5D5Lz101N; Sun, 2 Apr 2023 02:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3322NoeA084167; Sun, 2 Apr 2023 02:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3322No3A084166; Sun, 2 Apr 2023 02:23:50 GMT (envelope-from git) Date: Sun, 2 Apr 2023 02:23:50 GMT Message-Id: <202304020223.3322No3A084166@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Brooks Davis Subject: git: 003b969feea2 - main - devel/llvm16: add a lite FLAVOR List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 003b969feea21d4759a4c87815c843f0b6ebbf8f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=003b969feea21d4759a4c87815c843f0b6ebbf8f commit 003b969feea21d4759a4c87815c843f0b6ebbf8f Author: Brooks Davis AuthorDate: 2023-04-02 02:17:47 +0000 Commit: Brooks Davis CommitDate: 2023-04-02 02:17:47 +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.) Sponsored by: DARPA --- devel/llvm16/Makefile | 43 +++++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/devel/llvm16/Makefile b/devel/llvm16/Makefile index 7356789f723c..86b18d6e5c22 100644 --- a/devel/llvm16/Makefile +++ b/devel/llvm16/Makefile @@ -1,6 +1,6 @@ PORTNAME= llvm DISTVERSION= 16.0.0 -PORTREVISION= 1 +PORTREVISION= 2 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=