mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 13:57:14 +02:00
testing/wabt: Disable link-time optimization
Wabt compiles two static libraries: libwabt.a and libwasm-rt-impl.a. When forced to compile with LTO, those libraries end up with LLVM bytecode files with .o extension, causing linking to fail in a lot of cases. CMake lacks sufficient support for LTO to compile static libraries correctly, so I think the best solution for now is to disable it.
This commit is contained in:
parent
09ca23bc81
commit
1449b5b4b2
@ -2,21 +2,14 @@
|
||||
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
|
||||
pkgname=wabt
|
||||
pkgver=1.0.35
|
||||
pkgrel=0
|
||||
pkgrel=1
|
||||
_wasm_c_api="b6dd1fb658a282c64b029867845bc50ae59e1497"
|
||||
_picosha2="27fcf6979298949e8a462e16d09a0351c18fcaf2"
|
||||
pkgdesc="WebAssembly binary toolkit"
|
||||
# s390x: lld
|
||||
# riscv64: llvm still has broken lto on riscv with floating abi errors
|
||||
arch="all !s390x !riscv64"
|
||||
arch="all"
|
||||
url="https://github.com/WebAssembly/wabt"
|
||||
license="Apache-2.0"
|
||||
makedepends="
|
||||
clang
|
||||
cmake
|
||||
lld
|
||||
samurai
|
||||
"
|
||||
makedepends="cmake samurai"
|
||||
subpackages="$pkgname-doc"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/WebAssembly/wabt/archive/$pkgver.tar.gz
|
||||
wasm-c-api-$_wasm_c_api.tar.gz::https://github.com/WebAssembly/wasm-c-api/archive/$_wasm_c_api.tar.gz
|
||||
@ -47,11 +40,8 @@ build() {
|
||||
local crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
||||
fi
|
||||
|
||||
CC=clang \
|
||||
CXX=clang++ \
|
||||
CFLAGS="$CFLAGS -O2 -flto=thin" \
|
||||
CXXFLAGS="$CXXFLAGS -O2 -flto=thin" \
|
||||
LDFLAGS="$LDFLAGS -fuse-ld=lld" \
|
||||
CFLAGS="$CFLAGS -O2" \
|
||||
CXXFLAGS="$CXXFLAGS -O2" \
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
|
Loading…
Reference in New Issue
Block a user