From bf19163a545c3117ab3c309a691f32a42cf29efd Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Thu, 2 Dec 2021 09:39:22 -0500 Subject: runtime/cgo: remove stdlib.h warning workaround on darwin CL 205457 added the flag -Wno-nullability-completeness to work around a user-reported build breakage on macOS Catalina. However, according to https://golang.org/issue/35247#issuecomment-589115489 the root cause of the breakage may be a toolchain misconfiguration on the host (perhaps compiling the XCode stdlib using a Homebrew build of the "clang" compiler?). Adding an obscure warning flag to enable building stdlib.h with an otherwise-broken toolchain seems clearly inappropriate to me. If need be we can instead provide guidance to users on how to unbreak their toolchain. Updates #35247 Fixes #49913 Change-Id: I84def34e101bed7911d8d78a991a29095b8791fa Reviewed-on: https://go-review.googlesource.com/c/go/+/368634 Reviewed-by: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Run-TryBot: Bryan Mills Auto-Submit: Bryan Mills TryBot-Result: Gopher Robot --- src/runtime/cgo/cgo.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/runtime/cgo/cgo.go b/src/runtime/cgo/cgo.go index 4d2caf6c4f3..8d72d792b1f 100644 --- a/src/runtime/cgo/cgo.go +++ b/src/runtime/cgo/cgo.go @@ -23,9 +23,6 @@ package cgo #cgo solaris LDFLAGS: -lxnet #cgo illumos LDFLAGS: -lsocket -// Issue 35247. -#cgo darwin CFLAGS: -Wno-nullability-completeness - #cgo CFLAGS: -Wall -Werror #cgo solaris CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS -- cgit v1.2.3