1
hermetic_cc_toolchain/test/BUILD

40 lines
900 B
Python
Raw Normal View History

load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
go_library(
name = "go_lib",
srcs = ["hello.go"],
cgo = True,
importpath = "github.com/motiejus/bazel-zig-cc/test",
visibility = ["//visibility:private"],
)
go_binary(
name = "gognu",
embed = [":go_lib"],
2021-06-16 12:44:16 +03:00
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
go_binary(
name = "gomacos",
embed = [":go_lib"],
gc_linkopts = [
"-s",
"-w",
"-buildmode=pie",
],
target_compatible_with = ["@platforms//os:macos"],
visibility = ["//visibility:public"],
)
go_binary(
name = "gomusl",
embed = [":go_lib"],
static = "on",
target_compatible_with = select({
"@platforms//os:linux": ["@zig_sdk//:libc_musl"],
"//conditions:default": [],
}),
visibility = ["//visibility:public"],
2021-04-10 01:05:01 +03:00
)