aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2023-03-18 19:11:12 +0000
committerpsykose <alice@ayaya.dev>2023-03-18 20:11:12 +0100
commitef187bfaf6db20aa17608ac5ebca1ebe4de813e1 (patch)
tree828f22b124d8cf9d42c242919dd0b1422dc74d51
parent4718449dc5cd0bec3c337257a71b970b85769fd3 (diff)
testing/zig: fix finding llvm15
-rw-r--r--testing/zig/APKBUILD6
-rw-r--r--testing/zig/llvmconfig.patch13
2 files changed, 18 insertions, 1 deletions
diff --git a/testing/zig/APKBUILD b/testing/zig/APKBUILD
index 35d5a14d68b..7986e8716a2 100644
--- a/testing/zig/APKBUILD
+++ b/testing/zig/APKBUILD
@@ -24,7 +24,9 @@ makedepends="
"
provides="zig-dev=$pkgver-r$pkgrel"
subpackages="$pkgname-doc"
-source="$pkgname-$pkgver.tar.gz::https://github.com/ziglang/zig/archive/$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/ziglang/zig/archive/$pkgver.tar.gz
+ llvmconfig.patch
+ "
build() {
local crossopts=
@@ -39,6 +41,7 @@ build() {
-DZIG_VERSION="$pkgver" \
-DZIG_SHARED_LLVM=ON \
-DZIG_TARGET_MCPU=baseline \
+ -DCLANG_INCLUDE_DIRS=/usr/lib/llvm$_llvmver/include \
$crossopts
cmake --build build
@@ -69,4 +72,5 @@ package() {
sha512sums="
20ff9c59cd01aa64c017c86d3ac70cf3a1efacae7a9ea3f110df028eeec3b2b9e95adc1dfdd41eb07ebcf12951fee32d429253918a7ef0a5ab0f6036751ad964 zig-0.10.1.tar.gz
+61e08b8c0059df3c4a9465ae59a762fe972a1e628c6e015c9919e0c39154e704ae45e365fc697da562ef17f17f15d704ecf92da6ab5d402b69f3b86861c2edcf llvmconfig.patch
"
diff --git a/testing/zig/llvmconfig.patch b/testing/zig/llvmconfig.patch
new file mode 100644
index 00000000000..0d738d62834
--- /dev/null
+++ b/testing/zig/llvmconfig.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/Findllvm.cmake b/cmake/Findllvm.cmake
+index d866203..9a8ead1 100644
+--- a/cmake/Findllvm.cmake
++++ b/cmake/Findllvm.cmake
+@@ -14,7 +14,7 @@ if(ZIG_USE_LLVM_CONFIG)
+ while(1)
+ unset(LLVM_CONFIG_EXE CACHE)
+ find_program(LLVM_CONFIG_EXE
+- NAMES llvm-config-15 llvm-config-15.0 llvm-config150 llvm-config15 llvm-config NAMES_PER_DIR
++ NAMES llvm15-config llvm-config-15 llvm-config-15.0 llvm-config150 llvm-config15 llvm-config NAMES_PER_DIR
+ PATHS
+ "/mingw64/bin"
+ "/c/msys64/mingw64/bin"