Broken cross compiles

main
Nick Dumas 1 year ago
parent b214a9ebd4
commit 3175de6e12

17
BUILD

@ -1,4 +1,4 @@
load("@rules_go//go:def.bzl", "go_binary", "go_library")
load("@rules_go//go:def.bzl", "go_binary", "go_library", "go_cross_binary")
load("@gazelle//:def.bzl", "gazelle")
gazelle(name = "gazelle")
@ -16,3 +16,18 @@ go_binary(
embed = [":bingbong_lib"],
visibility = ["//visibility:public"],
)
platform(
name = "macos",
constraint_values = [
"@platforms//os:osx",
"@platforms//cpu:x86_64",
],
)
go_cross_binary(
name = "darwin_binary",
platform = ":macos",
sdk_version = "1.21.0",
target = "bingbong",
)

@ -5,7 +5,7 @@ module(
bazel_dep(name = "gazelle", version = "0.32.0")
bazel_dep(name = "rules_go", version = "0.41.0")
bazel_dep(name = "rules_oci", version = "1.2.0")
bazel_dep(name = "platforms", version = "0.0.7")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")

Loading…
Cancel
Save