1
This commit is contained in:
Mantas Jonaitis
2021-11-05 19:29:07 +02:00
committed by Motiejus Jakštys
parent 47d91cbbed
commit 523943bd35
5 changed files with 39 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//rules:go_binary_override.bzl", "go_binary")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "hello_lib",
@@ -7,22 +8,14 @@ go_library(
importpath = "github.com/motiejus/bazel-zig-cc/test",
visibility = ["//visibility:private"],
deps = [
"@com_github_datadog_zstd//:go_default_library",
"@com_github_mattn_go_sqlite3//:go_default_library",
"@com_github_datadog_zstd//:zstd",
"@com_github_mattn_go_sqlite3//:go-sqlite3",
],
)
go_binary(
name = "hello",
embed = [":hello_lib"],
gc_linkopts = select({
"@platforms//os:macos": [
"-s",
"-w",
"-buildmode=pie",
],
"//conditions:default": [],
}),
static = "on",
visibility = ["//visibility:public"],
)