2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-22 07:10:16 -07:00
repo/extra/clang/build

38 lines
853 B
Plaintext
Raw Normal View History

2019-07-31 07:40:00 -06:00
#!/bin/sh -e
2023-03-02 07:40:00 -07:00
export DESTDIR="$1"
2024-03-23 03:08:33 -06:00
patch -p1 < musl-targets.patch
2023-07-19 19:01:17 -06:00
cd clang
2019-11-13 17:29:42 -07:00
cmake -B build \
2019-07-31 07:40:00 -06:00
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_EH=ON \
2021-08-15 10:42:41 -06:00
-DLLVM_ENABLE_LIBXML2=OFF \
2023-10-30 21:46:34 -06:00
-DLLVM_INCLUDE_TESTS=OFF \
2019-07-31 07:40:00 -06:00
-DCLANG_BUILD_EXAMPLES=OFF \
-DCLANG_INCLUDE_DOCS=OFF \
-DCLANG_INCLUDE_TESTS=OFF \
-DLIBCLANG_BUILD_STATIC=ON \
2019-11-13 17:29:42 -07:00
-Wno-dev
2019-07-31 07:40:00 -06:00
2019-11-13 17:29:42 -07:00
cmake --build build
cmake --install build
2020-05-08 02:57:33 -06:00
# Fix up libexec location. This can't be done during
# the configure stage of the build as it is hardcoded.
{
2021-10-01 21:06:17 -06:00
mv -f \
"$1/usr/libexec/"*analyze* \
"$1/usr/libexec/"*intercept* \
"$1/usr/lib/clang"
2020-05-08 02:57:33 -06:00
rmdir "$1/usr/libexec"
2021-07-03 14:41:01 -06:00
sed 's|libexec|lib/clang|' "$1/usr/bin/scan-build" > _
mv -f _ "$1/usr/bin/scan-build"
chmod +x "$1/usr/bin/scan-build"
2020-05-08 02:57:33 -06:00
}