mirror of
https://github.com/Ascend/ascend-docker-runtime.git
synced 2025-10-24 03:03:56 +08:00
Match-id-d87d238e89a1fd2e2d3e63729ae38aae78a91d57
This commit is contained in:
@@ -61,6 +61,10 @@ function build_bin()
|
||||
echo "make hook"
|
||||
[ -d "${HOOKSRCDIR}/build" ] && rm -rf ${HOOKSRCDIR}/build
|
||||
mkdir ${HOOKSRCDIR}/build && cd ${HOOKSRCDIR}/build
|
||||
export CGO_ENABLED=1
|
||||
export CGO_CFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -fPIC -ftrapv"
|
||||
export CGO_CPPFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -fPIC -ftrapv"
|
||||
export CGO_LDFLAGS="-Wl,-z,now -Wl,-s,--build-id=none -pie"
|
||||
go build -buildmode=pie -ldflags='-linkmode=external -buildid=IdNetCheck -extldflags "-Wl,-z,now" -w -s' -trimpath ../${HOOKSRCNAME}
|
||||
mv main ascend-docker-hook
|
||||
|
||||
|
Reference in New Issue
Block a user