]> Cypherpunks repositories - gostls13.git/commitdiff
net: document that on macOS c-archive requires -lresolv
authorIan Lance Taylor <iant@golang.org>
Thu, 23 Feb 2023 23:13:06 +0000 (15:13 -0800)
committerGopher Robot <gobot@golang.org>
Fri, 24 Feb 2023 20:00:34 +0000 (20:00 +0000)
For #58159

Change-Id: Iff8e017c568be111c494992cb6fe62d469e0f981
Reviewed-on: https://go-review.googlesource.com/c/go/+/470917
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/net/net.go

index 0a4f7471c417b916f2146c7c9d6c0e7d8e58487d..a9e9a6478ad4341fb7883415a946995125b399a7 100644 (file)
@@ -71,6 +71,10 @@ to print debugging information about its decisions.
 To force a particular resolver while also printing debugging information,
 join the two settings by a plus sign, as in GODEBUG=netdns=go+1.
 
+On macOS, if Go code that uses the net package is built with
+-buildmode=c-archive, linking the resulting archive into a C program
+requires passing -lresolv when linking the C code.
+
 On Plan 9, the resolver always accesses /net/cs and /net/dns.
 
 On Windows, in Go 1.18.x and earlier, the resolver always used C