fix: disable cgo

This commit is contained in:
Vincent Young
2023-02-18 20:46:16 +08:00
parent 0532327aed
commit e593bceb97
2 changed files with 7 additions and 25 deletions
+5 -11
View File
@@ -3,7 +3,7 @@
# @Author: Vincent Young
# @Date: 2022-10-20 02:19:06
# @LastEditors: Vincent Young
# @LastEditTime: 2022-10-20 09:51:57
# @LastEditTime: 2023-02-18 20:45:52
# @FilePath: /DeepLX/.cross_compile.sh
# @Telegram: https://t.me/missuo
#
@@ -29,16 +29,10 @@ for pl in ${PLATFORMS}; do
echo "build => ${TARGET}"
if [ "${DEBUG_MODE}" == "debug" ]; then
go build -trimpath -gcflags "all=-N -l" -o ${TARGET} \
-ldflags "-X 'main.version=${BUILD_VERSION}' \
-X 'main.buildDate=${BUILD_DATE}' \
-X 'main.commitID=${COMMIT_SHA1}'\
-w -s"
CGO_ENABLED=0 go build -trimpath -gcflags "all=-N -l" -o ${TARGET} \
-ldflags "-w -s" main.go
else
go build -trimpath -o ${TARGET} \
-ldflags "-X 'main.version=${BUILD_VERSION}' \
-X 'main.buildDate=${BUILD_DATE}' \
-X 'main.commitID=${COMMIT_SHA1}'\
-w -s"
CGO_ENABLED=0 go build -trimpath -o ${TARGET} \
-ldflags "-w -s" main.go
fi
done