clang [testing]: 16.0.3

This commit is contained in:
Owen Rafferty 2023-05-14 17:36:45 -05:00
parent 2ed81d28fb
commit 5bb9de03ae
No known key found for this signature in database
6 changed files with 112 additions and 0 deletions

68
testing/clang/README Normal file
View File

@ -0,0 +1,68 @@
clang
________________________________________________________________________________
Clang is a compiler front end for the C, C++, Objective-C and Objective-C++
programming languages, as well as the OpenMP, OpenCL, RenderScript, CUDA and
HIP frameworks. It uses the LLVM compiler infrastructure as its back end and has
been part of the LLVM release cycle since LLVM 2.6.
It is designed to act as a drop-in replacement for the GNU Compiler Collection
(GCC), supporting most of its compilation flags and unofficial language
extensions. Its contributors include Apple, Microsoft, Google, ARM, Sony,
Intel and Advanced Micro Devices (AMD). [0]
Upstream: https://clang.llvm.org/
[000] Index
________________________________________________________________________________
* Installation ........................................................... [001]
* Setup .................................................................. [002]
* Usage .................................................................. [003]
* Troubleshooting ........................................................ [004]
* References ............................................................. [005]
[001] Installation
________________________________________________________________________________
+------------------------------------------------------------------------------+
| |
| $ kiss b clang |
| |
+------------------------------------------------------------------------------+
[002] Setup
________________________________________________________________________________
To use clang as the system compiler, set the following environment variables in
your .profile or shell runtime configuration file.
+------------------------------------------------------------------------------+
| |
| $ export CC=clang |
| $ export CXX=clang++ |
| |
+------------------------------------------------------------------------------+
[003] Usage
________________________________________________________________________________
Refer to the command help output. This package does not yet provide manual
pages. Documentation can also be found online.
[004] Troubleshooting
________________________________________________________________________________
If a package fails to build with clang, open an issue at $/kisslinux/repo
[005] References
________________________________________________________________________________
[0] https://en.wikipedia.org/wiki/Clang

34
testing/clang/build Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh -e
export DESTDIR="$1"
cd clang
cmake -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_EH=ON \
-DLLVM_ENABLE_LIBXML2=OFF \
-DCLANG_BUILD_EXAMPLES=OFF \
-DCLANG_INCLUDE_DOCS=OFF \
-DCLANG_INCLUDE_TESTS=OFF \
-DLIBCLANG_BUILD_STATIC=ON \
-Wno-dev
cmake --build build
cmake --install build
# Fix up libexec location. This can't be done during
# the configure stage of the build as it is hardcoded.
{
mv -f \
"$1/usr/libexec/"*analyze* \
"$1/usr/libexec/"*intercept* \
"$1/usr/lib/clang"
rmdir "$1/usr/libexec"
sed 's|libexec|lib/clang|' "$1/usr/bin/scan-build" > _
mv -f _ "$1/usr/bin/scan-build"
chmod +x "$1/usr/bin/scan-build"
}

2
testing/clang/checksums Normal file
View File

@ -0,0 +1,2 @@
d4ca2b1fe727cd98f8bf17b90533e80fde90637162245c6e4ed0fd6669cb293dd0
40a6c658591f26fe23ad5e5b3e6645eea2476e31b9adbcce139949ee17f17b1dea

5
testing/clang/depends Normal file
View File

@ -0,0 +1,5 @@
cmake make
llvm
python make
xz
zlib

2
testing/clang/sources Normal file
View File

@ -0,0 +1,2 @@
https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.3/clang-16.0.3.src.tar.xz clang
https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.3/cmake-16.0.3.src.tar.xz cmake

1
testing/clang/version Normal file
View File

@ -0,0 +1 @@
16.0.3 1