[scripts] Add support for seccomp build flags.

This commit is contained in:
Ciprian Dorin Craciun 2022-09-11 13:40:58 +03:00
parent edbba3ee0d
commit 644be877f6

View file

@ -89,6 +89,16 @@
-X "github.com/volution/kawipiko/embedded.BUILD_TARGET=release" -X "github.com/volution/kawipiko/embedded.BUILD_TARGET=release"
-X "github.com/volution/kawipiko/embedded.BUILD_GIT_HASH=$( exec -- cat -- ./.outputs/markers/build-git-hash.txt )" -X "github.com/volution/kawipiko/embedded.BUILD_GIT_HASH=$( exec -- cat -- ./.outputs/markers/build-git-hash.txt )"
) )
_seccomp="${__BUILD_SECCOMP:-false}"
if test "${_seccomp}" == true ; then
_tags+=(
seccomp
)
_ldflags+=(
-linkmode external
-extldflags -static
)
fi
_flags+=( _flags+=(
-tags "$( printf -- '%s,' "${_tags[@]}" )" -tags "$( printf -- '%s,' "${_tags[@]}" )"
-gcflags "$( printf -- '%s ' "${_gcflags[@]}" )" -gcflags "$( printf -- '%s ' "${_gcflags[@]}" )"