From 644be877f67057c83bc3869a134aed7fcbce3b90 Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Sun, 11 Sep 2022 13:40:58 +0300 Subject: [PATCH] [scripts] Add support for `seccomp` build flags. --- scripts/go.z-run | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/go.z-run b/scripts/go.z-run index 5783e43..786eb95 100644 --- a/scripts/go.z-run +++ b/scripts/go.z-run @@ -89,6 +89,16 @@ -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 )" ) + _seccomp="${__BUILD_SECCOMP:-false}" + if test "${_seccomp}" == true ; then + _tags+=( + seccomp + ) + _ldflags+=( + -linkmode external + -extldflags -static + ) + fi _flags+=( -tags "$( printf -- '%s,' "${_tags[@]}" )" -gcflags "$( printf -- '%s ' "${_gcflags[@]}" )"