diff options
Diffstat (limited to 'user/llvm18')
-rw-r--r-- | user/llvm18/APKBUILD | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/user/llvm18/APKBUILD b/user/llvm18/APKBUILD index 8bcd3067f..d727afc2a 100644 --- a/user/llvm18/APKBUILD +++ b/user/llvm18/APKBUILD @@ -80,23 +80,12 @@ prepare() { rm test/tools/llvm-size/radix.test;; esac - # https://github.com/llvm/llvm-project/issues/96734 case $CARCH in ppc64|ppc|mips64|mips) # Appears to be a endianness issue. for _broken in eh_frame linker-llvm-union-fwd-decl; do rm test/tools/dsymutil/X86/$_broken.test; done - for _broken in accelerator-dwarf4 accelerator-dwarf5 \ - dwarf4-macro-short; do - rm test/tools/llvm-dwarfutil/ELF/X86/$_broken.test; - done - for _broken in inlined-static-variable.cpp keep-func.test \ - odr-fwd-declaration2.test odr-member-functions.cpp \ - odr-predictable-output2.test odr-string.test \ - odr-types-in-subprogram1.test odr-uniquing.cpp; do - rm test/tools/dsymutil/X86/DWARFLinkerParallel/$_broken - done;; esac case $CTARGET_ARCH in @@ -133,10 +122,6 @@ prepare() { done esac - # appears to be an issue on musl and glibc, but only fails on musl: - # https://github.com/NixOS/nixpkgs/blob/bb7e9e46/pkgs/development/compilers/llvm/8/llvm.nix#L74 - # rm -f test/CodeGen/AArch64/wineh4.mir - #1053 rm -fr \ test/tools/UpdateTestChecks \ @@ -183,6 +168,7 @@ build() { -DLLVM_HOST_TRIPLE="$CHOST" \ -DLLVM_INCLUDE_BENCHMARKS=OFF \ -DLLVM_INCLUDE_EXAMPLES=OFF \ + -DLLVM_INSTALL_GTEST=ON \ -DLLVM_INSTALL_UTILS=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_TARGETS_TO_BUILD='AArch64;AMDGPU;ARM;BPF;Hexagon;Lanai;Mips;MSP430;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86;XCore' \ @@ -194,6 +180,13 @@ build() { make -C build python3 utils/lit/setup.py build + + # Thread 3 requires a lot of stack space to LTO when targeting ARM. + # Note that this occurs even when crossing (on a ppc64 host). + chelf -s 1048576 build/bin/llvm-lto2 + # Needed for parallel-linker support (pthread stack size). + chelf -s 1048576 build/bin/dsymutil + chelf -s 1048576 build/bin/llvm-dwarfutil } check() { @@ -210,10 +203,6 @@ package() { | awk -F: '$2~/ELF/{print $1}' \ | xargs -r chrpath -d - # Thread 3 requires a lot of stack space to LTO when targeting ARM. - # Note that this occurs even when crossing (on a ppc64 host). - chelf -s 1048576 bin/llvm-lto2 - # Symlink files from /usr/lib/llvm*/bin to /usr/bin. mkdir -p "$pkgdir"/usr/bin for full_name in bin/*; do @@ -263,7 +252,11 @@ libs() { # dynamically linked with libLLVM, so they can find it on default path. mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/$_prefix/lib/$main_soname "$subpkgdir"/usr/lib/ - mv "$pkgdir"/$_prefix/lib/libLLVM.so.$_majorver* "$subpkgdir"/usr/lib/ + _solinks=$(ls "$pkgdir"/$_prefix/lib/libLLVM.so.$_majorver*) + for link in $_solinks; do + _real_link=$(basename $link) + mv "$pkgdir"/$_prefix/lib/$_real_link "$subpkgdir"/usr/lib/ + done ln -s $main_soname "$subpkgdir"/usr/lib/$ver_soname strip "$subpkgdir"/usr/lib/$ver_soname #797 @@ -272,6 +265,10 @@ libs() { ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/$main_soname ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/$ver_soname ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/libLLVM.so + for link in $_solinks; do + _real_link=$(basename $link) + ln -s ../../$main_soname "$subpkgdir"/$_prefix/lib/$_real_link + done } dev() { |