automatically set clinkopts

This commit is contained in:
Benjamin Elder 2019-06-21 15:31:04 -07:00
parent 23fa8e7b6e
commit d596093925
2 changed files with 8 additions and 0 deletions

View File

@ -79,3 +79,10 @@ buildozer -quiet 'add tags manual' '//vendor/...:%go_binary' '//vendor/...:%go_t
if [[ $ret != 0 && $ret != 3 ]]; then
exit 1
fi
# we need to set this because gazelle doesn't support pkg-config, which would set this link option
# see comment above re: buildozer exit codes
buildozer -quiet 'set clinkopts select({"@io_bazel_rules_go//go/platform:linux":["-lseccomp",],"//conditions:default":[],})' //vendor/github.com/seccomp/libseccomp-golang:go_default_library && ret=$? || ret=$?
if [[ $ret != 0 && $ret != 3 ]]; then
exit 1
fi

View File

@ -7,6 +7,7 @@ go_library(
"seccomp_internal.go",
],
cgo = True,
clinkopts = select({"@io_bazel_rules_go//go/platform:linux":["-lseccomp",],"//conditions:default":[],}),
importmap = "k8s.io/kubernetes/vendor/github.com/seccomp/libseccomp-golang",
importpath = "github.com/seccomp/libseccomp-golang",
visibility = ["//visibility:public"],