UmVirt LFS Package info
DB commit: 48bb9ee31306c82c48dfaaad707eb4f6a926eb8a
APP commit: 1ca4178aea919e4c9e869e3d650ff8af9678bd6f
llvm
The LLVM package contains a collection of modular and reusable compiler and toolchain technologies.Package info
Codename: llvm
Source file: llvm-18.1.7.src.tar.xz
Source directory: llvm-18.1.7.src
Package URL: https://umvirt.com/linux/downloads/0.2.2/packages/l/llvm-18.1.7.src.tar.xz
Package md5-checksum URL: https://umvirt.com/linux/downloads/0.2.2/packages/l/llvm-18.1.7.src.tar.xz.md5sum
Dependances: cmake.
Dependance of: dhcpcd, v4l-utils, duckstation, SPIRV-LLVM-Translator, ImageMagick, mesa-libglvnd, mesa, !libreoffice7, libreoffice.
Patches: *** NO PATCHES FOUND ***
Addons: llvm-cmake-18.src.tar.xz, llvm-third-party-18.src.tar.xz, clang-18.1.7.src.tar.xz, compiler-rt-18.1.7.src.tar.xz.
Nestings *** NO NESTINGS FOUND ***
Configuration script:
tar -xf ../llvm-cmake-18.src.tar.xz &&
tar -xf ../llvm-third-party-18.src.tar.xz &&
sed '/LLVM_COMMON_CMAKE_UTILS/s@../cmake@llvm-cmake-18.src@' \
-i CMakeLists.txt &&
sed '/LLVM_THIRD_PARTY_DIR/s@../third-party@llvm-third-party-18.src@' \
-i cmake/modules/HandleLLVMOptions.cmake
tar -xf ../clang-18.1.7.src.tar.xz -C tools &&
mv tools/clang-18.1.7.src tools/clang
tar -xf ../compiler-rt-18.1.7.src.tar.xz -C projects &&
mv projects/compiler-rt-18.1.7.src projects/compiler-rt
grep -rl '#!.*python' | xargs sed -i '1s/python$/python3/'
sed 's/utility/tool/' -i utils/FileCheck/CMakeLists.txt
sed 's/clang_dfsan/& -fno-stack-protector/' \
-i projects/compiler-rt/test/dfsan/origin_unaligned_memtrans.c
mkdir -v build &&
cd build &&
CC=gcc CXX=g++ \
cmake -D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_SKIP_INSTALL_RPATH=ON \
-D LLVM_ENABLE_FFI=ON \
-D CMAKE_BUILD_TYPE=Release \
-D LLVM_BUILD_LLVM_DYLIB=ON \
-D LLVM_LINK_LLVM_DYLIB=ON \
-D LLVM_ENABLE_RTTI=ON \
-D LLVM_TARGETS_TO_BUILD="host;AMDGPU" \
-D LLVM_BINUTILS_INCDIR=/usr/include \
-D LLVM_INCLUDE_BENCHMARKS=OFF \
-D CLANG_DEFAULT_PIE_ON_LINUX=ON \
-D CLANG_CONFIG_FILE_SYSTEM_DIR=/etc/clang \
-W no-dev -G Ninja ..
Build script:
cd build
ninja
if [[ "$ULFS_PKG_TEST" == "YES" ]]
then
rm -f ../projects/compiler-rt/test/tsan/getline_nohang.cpp
systemctl --user start dbus &&
systemd-run --user --pty -d -G -p LimitCORE=0 ninja check-all
fi
Install script:
cd build
ninja install
mkdir -pv /etc/clang &&
for i in clang clang++; do
echo -fstack-protector-strong > /etc/clang/\$i.cfg
done
Arch specific instructions
lib32_amd64
Dependances: *** NO DEPENDANCES FOUND ***
Configuration script:
tar -xf ../llvm-cmake-17.src.tar.xz &&
tar -xf ../llvm-third-party-17.src.tar.xz &&
sed '/LLVM_COMMON_CMAKE_UTILS/s@../cmake@llvm-cmake-17.src@' \
-i CMakeLists.txt &&
sed '/LLVM_THIRD_PARTY_DIR/s@../third-party@llvm-third-party-17.src@' \
-i cmake/modules/HandleLLVMOptions.cmake
tar -xf ../clang-17.0.6.src.tar.xz -C tools &&
mv tools/clang-17.0.6.src tools/clang
tar -xf ../compiler-rt-17.0.6.src.tar.xz -C projects &&
mv projects/compiler-rt-17.0.6.src projects/compiler-rt &&
sed '/^set(LLVM_COMMON_CMAKE_UTILS/d' \
-i projects/compiler-rt/CMakeLists.txt
grep -rl '#!.*python' | xargs sed -i '1s/python$/python3/'
patch -Np2 -d tools/clang <../clang-17-enable_default_ssp-1.patch
sed 's/clang_dfsan/& -fno-stack-protector/' \
-i projects/compiler-rt/test/dfsan/origin_unaligned_memtrans.c
mkdir -v build &&
cd build
CC="gcc -m32" CXX="g++ -m32" \
PKG_CONFIG_PATH="/usr/lib32/pkgconfig" \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS:STRING=-m32 \
-DCMAKE_C_FLAGS:STRING=-m32 \
-DLLVM_DEFAULT_TARGET_TRIPLE="i686-pc-linux-gnu" \
-DLLVM_ENABLE_FFI=ON \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_INCLUDE_BENCHMARKS=OFF \
-DCLANG_DEFAULT_PIE_ON_LINUX=ON \
-DLLVM_LIBDIR_SUFFIX=32 \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_BUILD_DOCS=OFF \
-DLLVM_TARGET_ARCH:STRING=i686 \
-Wno-dev -G Ninja ..
Build script:
cd build
ninja
Install script:
cd build
DESTDIR=DESTDIR ninja install
cp -Rv DESTDIR/usr/lib32/* /usr/lib32
cp -v "DESTDIR/usr/bin/llvm-config" "/usr/bin/llvm-config32"