diff --git a/WORKSPACE b/WORKSPACE index 230d985..d3fd870 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -17,10 +17,10 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe http_archive( name = "bazel_gazelle", - sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e", + sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", + "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.29.0/bazel-gazelle-v0.29.0.tar.gz", ], ) @@ -33,7 +33,7 @@ go_rules_dependencies() go_download_sdk( name = "go_sdk", #version = "1.20rc1", - version = "1.19.3", + version = "1.19.5", ) go_register_toolchains() diff --git a/test/cgo/BUILD b/test/cgo/BUILD index a65c350..71863ec 100644 --- a/test/cgo/BUILD +++ b/test/cgo/BUILD @@ -6,6 +6,7 @@ go_library( name = "cgo_lib", srcs = ["cgo.go"], cgo = True, + clinkopts = ["-lresolv"], importpath = "git.sr.ht/~motiejus/bazel-zig-cc/test/cgo", visibility = ["//visibility:private"], ) diff --git a/test/cgo/cgo.go b/test/cgo/cgo.go index 2519b21..77afdf6 100644 --- a/test/cgo/cgo.go +++ b/test/cgo/cgo.go @@ -7,6 +7,7 @@ package main // #include // char* hello() { return "hello, world"; } // void phello() { printf("%s, your lucky numbers are %p and %p\n", hello(), fcntl, res_search); } +// #cgo LDFLAGS: -lresolv import "C" func main() {