From a47c7abc96ff824468caacbe861aea521cd3cbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 18 Jan 2023 16:58:08 +0200 Subject: [PATCH] upgrade gazelle, add -lresolv does not fix the test --- WORKSPACE | 8 ++++---- test/cgo/BUILD | 1 + test/cgo/cgo.go | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) 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() {