tools/llvm: update to 18.1.7

- release notes:
  - https://discourse.llvm.org/t/llvm-16-0-0-release/69326
  - https://discourse.llvm.org/t/llvm-17-0-1-released/73549
  - https://discourse.llvm.org/t/llvm-18-1-0-released/77448
  - https://discourse.llvm.org/t/llvm-18-1-1-released/77540
  - https://discourse.llvm.org/t/18-1-2-released/77821
  - https://discourse.llvm.org/t/18-1-3-released/78136
  - https://discourse.llvm.org/t/18-1-4-released/78430
  - https://discourse.llvm.org/t/18-1-5-released/78740
  - https://discourse.llvm.org/t/18-1-6-released/79068
  - https://discourse.llvm.org/t/18-1-7-released/79433
- remove PKG_RELEASE (irrelevant to tools)
- set default target/triplet to "bpf"
- rearrange configuration options
- better control feature support and improve build reproducibility:
  disable auxiliary features that are enabled implicitly - their
  support is detected at build-time

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15704
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Konstantin Demin 2024-06-19 19:43:51 +03:00 committed by Robert Marko
parent 85d9fd6f0e
commit 6988fe3d98

View File

@ -7,12 +7,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=llvm-project
PKG_VERSION:=15.0.7
PKG_RELEASE:=1
PKG_VERSION:=18.1.7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
PKG_HASH:=8b5fcb24b4128cf04df1b0b9410ce8b1a729cb3c544e6da885d234280dedeac6
PKG_HASH:=74446ab6943f686391954cbda0d77ae92e8a60c432eff437b8666e121d748ec4
PKG_CPE_ID:=cpe:/a:llvm:llvm
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION).src
@ -28,16 +27,27 @@ LLVM_BPF_PREFIX = llvm-bpf-$(PKG_VERSION).$(HOST_OS)-$(HOST_ARCH)
CMAKE_HOST_INSTALL_PREFIX = $(STAGING_DIR_HOST)/$(LLVM_BPF_PREFIX)
CMAKE_HOST_OPTIONS += \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD=BPF \
-DCLANG_BUILD_EXAMPLES=OFF \
-DLLVM_DEFAULT_TARGET_TRIPLE=bpf \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_TOOLCHAIN_TOOLS="llvm-objcopy;llvm-objdump;llvm-readelf;llvm-strip;llvm-ar;llvm-as;llvm-dis;llvm-link;llvm-nm;llvm-ranlib;llc;opt" \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_ENABLE_IDE=OFF \
-DLLVM_ENABLE_LIBEDIT=OFF \
-DLLVM_ENABLE_LIBPFM=OFF \
-DLLVM_ENABLE_LIBXML2=OFF \
-DLLVM_ENABLE_OCAMLDOC=OFF \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_Z3_SOLVER=OFF \
-DLLVM_ENABLE_ZLIB=OFF \
-DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_SKIP_RPATH=OFF
define Host/Install