From 7d8759a4708e5b6d65a3afa476766cd4fd4be8eb Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 1 Jun 2024 23:32:52 +0800 Subject: [PATCH] :art: Support Linux arm64 https://github.com/siyuan-note/siyuan/issues/11566 --- scripts/linux-build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/linux-build.sh b/scripts/linux-build.sh index 91b83255916..7ff9f71da6a 100755 --- a/scripts/linux-build.sh +++ b/scripts/linux-build.sh @@ -21,12 +21,12 @@ export CGO_ENABLED=1 echo 'Building Kernel amd64' export GOOS=linux export GOARCH=amd64 -go build --tags fts5 -v -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w" . +go build -buildmode=pie --tags fts5 -v -o "../app/kernel-linux/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" . echo 'Building Kernel arm64' export GOARCH=arm64 export CC=~/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc -go build --tags fts5 -v -o "../app/kernel-linux-arm64/SiYuan-Kernel" -ldflags "-s -w" . +go build -buildmode=pie --tags fts5 -v -o "../app/kernel-linux-arm64/SiYuan-Kernel" -ldflags "-s -w -extldflags -static-pie" . cd .. echo 'Building Electron App amd64'