blob: 9ac7d54108b06d735ae4e906f30eba6195d83318 (
plain)
1 # Description: clang compiler
2 # URL: https://clang.llvm.org/
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4 # Depends on: compiler-rt
5
6 name=clang
7 version=15.0.7
8 release=1
9 source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang-$version.src.tar.xz
10 https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang-tools-extra-$version.src.tar.xz
11 https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz
12 https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/cmake-$version.src.tar.xz
13 )
14
15 build() {
16 mv clang-tools-extra-$version.src clang-$version.src/tools/extra
17 prt-get isinst ccache && PKGMK_CLANG+=' -D LLVM_CCACHE_BUILD=ON'
18
19 cp -r $SRC/cmake-$version.src/Modules/* $name-$version.src/cmake/modules/.
20
21 cmake -S $name-$version.src -B build -G Ninja $PKGMK_CLANG \
22 -D CMAKE_INSTALL_PREFIX=/usr \
23 -D CMAKE_INSTALL_LIBEXECDIR=lib/clang \
24 -D CMAKE_BUILD_TYPE=Release \
25 -D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
26 -D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
27 -D LLVM_MAIN_SRC_DIR="$SRC/llvm-$version.src" \
28 -D LLVM_EXTERNAL_LIT=/usr/bin/lit \
29 -D LLVM_PARALLEL_COMPILE_JOBS="${JOBS:-1}" \
30 -Wno-dev
31 cmake --build build
32 DESTDIR=$PKG cmake --install build
33 }
|