nim: fix build error and use -Oz for aarch64
This commit is contained in:
parent
7adf17fb41
commit
70e85aef06
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://nim-lang.org/
|
||||
TERMUX_PKG_DESCRIPTION="Nim programming language compiler"
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_VERSION=0.20.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://nim-lang.org/download/nim-$TERMUX_PKG_VERSION.tar.xz
|
||||
TERMUX_PKG_SHA256=51f479b831e87b9539f7264082bb6a64641802b54d2691b3c6e68ac7e2699a90
|
||||
TERMUX_PKG_DEPENDS="clang, git, libandroid-glob"
|
||||
@ -19,8 +20,6 @@ termux_step_make() {
|
||||
elif [ $TERMUX_ARCH = "i686" ]; then
|
||||
export NIM_ARCH=i386
|
||||
elif [ $TERMUX_ARCH = "aarch64" ]; then
|
||||
# -Oz breaks aarch64 build
|
||||
CFLAGS+=" -Os"
|
||||
export NIM_ARCH=arm64
|
||||
else
|
||||
export NIM_ARCH=arm
|
||||
@ -41,9 +40,9 @@ termux_step_make() {
|
||||
make LD=$CC uos=linux mycpu=$NIM_ARCH myos=android -j $TERMUX_MAKE_PROCESSES useShPath=$TERMUX_PREFIX/bin/sh
|
||||
cp config/nim.cfg ../host-build/config
|
||||
|
||||
nim --opt:size --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:-I/data/data/com.termux/files/usr/include -l:"-L/data/data/com.termux/files/usr/lib -landroid-glob" c koch.nim
|
||||
nim --cc:clang --clang.exe=$CC --clang.linkerexe=$CC --opt:size --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:-I/data/data/com.termux/files/usr/include -l:"-L/data/data/com.termux/files/usr/lib -landroid-glob" c koch.nim
|
||||
cd dist/nimble/src
|
||||
nim --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:-I/data/data/com.termux/files/usr/include -l:"-L/data/data/com.termux/files/usr/lib -landroid-glob" c nimble.nim
|
||||
nim --cc:clang --clang.exe=$CC --clang.linkerexe=$CC --define:termux -d:release --os:android --cpu:$NIM_ARCH -t:-I/data/data/com.termux/files/usr/include -l:"-L/data/data/com.termux/files/usr/lib -landroid-glob" c nimble.nim
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
|
Loading…
Reference in New Issue
Block a user