2020-07-06 16:13:19 +02:00
|
|
|
# Description: Compiler runtime libraries for clang
|
2021-07-09 13:50:39 +02:00
|
|
|
# URL: https://compiler-rt.llvm.org/
|
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
|
|
|
# Depends on: llvm
|
2024-03-09 09:28:37 +01:00
|
|
|
# Optional: clang
|
2020-07-06 16:13:19 +02:00
|
|
|
|
|
|
|
name=compiler-rt
|
2024-03-09 09:28:37 +01:00
|
|
|
version=18.1.1
|
2021-08-31 18:40:36 +10:00
|
|
|
release=1
|
2021-10-01 18:25:11 +10:00
|
|
|
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/compiler-rt-$version.src.tar.xz
|
2022-08-29 21:39:30 +02:00
|
|
|
https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/llvm-$version.src.tar.xz
|
2022-09-23 16:26:22 +02:00
|
|
|
https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/cmake-$version.src.tar.xz)
|
|
|
|
|
2020-07-06 16:13:19 +02:00
|
|
|
build() {
|
2021-10-01 18:25:11 +10:00
|
|
|
mv llvm-$version.src llvm
|
2023-05-21 10:16:22 +02:00
|
|
|
mv cmake-$version.src cmake
|
2022-08-29 21:39:30 +02:00
|
|
|
|
2024-03-09 09:28:37 +01:00
|
|
|
if prt-get isinst clang; then
|
|
|
|
export CC=clang
|
|
|
|
export CXX=clang++
|
|
|
|
fi
|
|
|
|
|
2020-07-22 11:53:35 +00:00
|
|
|
cmake -S $name-$version.src -B build -G Ninja \
|
2020-11-21 14:27:02 +00:00
|
|
|
-D CMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-D CMAKE_BUILD_TYPE=Release \
|
2020-11-22 16:38:01 +00:00
|
|
|
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
|
|
|
|
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
|
2023-05-21 10:16:22 +02:00
|
|
|
-D COMPILER_RT_INSTALL_PATH=/usr/lib/clang/${version:0:2} \
|
2024-03-09 09:28:37 +01:00
|
|
|
-D COMPILER_RT_BUILD_LIBFUZZER=OFF \
|
|
|
|
-D COMPILER_RT_BUILD_ORC=OFF \
|
|
|
|
-D COMPILER_RT_BUILD_PROFILE=OFF \
|
|
|
|
-D COMPILER_RT_BUILD_SANITIZERS=OFF \
|
|
|
|
-D COMPILER_RT_BUILD_XRAY=OFF \
|
2020-07-06 16:13:19 +02:00
|
|
|
-Wno-dev
|
2020-11-21 14:27:02 +00:00
|
|
|
cmake --build build
|
|
|
|
DESTDIR=$PKG cmake --install build
|
2020-07-06 16:13:19 +02:00
|
|
|
}
|