mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Its value will be known only on the configuration phase, before that it can be a select directive. Updates #9266 PiperOrigin-RevId: 678412518
47 lines
1.1 KiB
Python
47 lines
1.1 KiB
Python
load("//tools:defs.bzl", "go_library")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
config_setting(
|
|
name = "network_plugins",
|
|
values = {"define": "network_plugins=true"},
|
|
)
|
|
|
|
go_library(
|
|
name = "cgo",
|
|
srcs = [
|
|
"cgo.go",
|
|
"nocgo_stub_unsafe.go",
|
|
"socket_unsafe.go",
|
|
"stack_unsafe.go",
|
|
"util_unsafe.go",
|
|
],
|
|
bazel_cdeps = select({
|
|
":network_plugins": ["@libpluginstack//:libpluginstack"],
|
|
"//conditions:default": [],
|
|
}),
|
|
bazel_cgo = select({
|
|
":network_plugins": True,
|
|
"//conditions:default": False,
|
|
}),
|
|
bazel_clinkopts = select({
|
|
":network_plugins": ["-L external/libpluginstack"],
|
|
"//conditions:default": [],
|
|
}),
|
|
bazel_copts = select({
|
|
":network_plugins": [
|
|
"-march=native",
|
|
"-I external/libpluginstack/lib/libtle_glue",
|
|
],
|
|
"//conditions:default": [],
|
|
}),
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//pkg/abi/linux",
|
|
"//pkg/abi/linux/errno",
|
|
],
|
|
)
|