1
0
mirror of https://github.com/golang/go synced 2024-11-17 23:34:52 -07:00
go/misc/cgo
Jay Conrod 1f9f88b95e cmd/go: fix cgo test when min macOS version is set
Regression tests for #24161 use a macro to conditionally compile some
stub definitions. The macro tests that the minimum macOS version is
less than 10.12.

We get duplicate definitions when building this test with
CGO_CFLAGS=-mmacosx-version-min=10.x where 10.x < 10.12. With this
change, we use a different macro, __MAC_OS_X_VERSION_MAX_ALLOWED__,
which tests the SDK version instead of the minimum macOS version. This
checks whether these definitions are present in headers.

After this change, 'go tool dist test cgo_test' should pass with
CGO_FLAGS=-mmacosx-version-min=10.10.

Updates #35459

Change-Id: I88d63601c94b0369c73c38d216a2d41ba7d4e579
Reviewed-on: https://go-review.googlesource.com/c/go/+/216243
Run-TryBot: Jay Conrod <jayconrod@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-01-24 17:36:44 +00:00
..
errors cmd/cgo: do not rewrite call if there are more args than parameters 2019-07-12 17:31:29 +00:00
fortran misc/cgo/fortran: avoid writing to $PWD 2019-11-20 22:37:23 +00:00
gmp
life misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
nocgo
stdio misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
test cmd/go: fix cgo test when min macOS version is set 2020-01-24 17:36:44 +00:00
testasan misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testcarchive misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testcshared misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testgodefs misc/cgo/testgodefs: convert test from bash to Go 2019-11-13 20:53:39 +00:00
testplugin misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testsanitizers runtime: save/restore callee saved registers in arm64's sigtramp 2019-06-03 19:02:11 +00:00
testshared misc/cgo/testshared: do not write to GOROOT 2019-11-25 17:05:01 +00:00
testsigfwd misc: log 'ok' from 'go run' tests on success 2019-11-25 16:43:27 +00:00
testso misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testsovar misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00
testtls