diff options
Diffstat (limited to 'src/cmd/go/testdata/script/build_darwin_cc_arch.txt')
-rw-r--r-- | src/cmd/go/testdata/script/build_darwin_cc_arch.txt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/script/build_darwin_cc_arch.txt b/src/cmd/go/testdata/script/build_darwin_cc_arch.txt new file mode 100644 index 0000000000..2b81b4cf80 --- /dev/null +++ b/src/cmd/go/testdata/script/build_darwin_cc_arch.txt @@ -0,0 +1,24 @@ +# Test that we pass -arch flag to C compiler on Darwin (issue 43692). + +[!darwin] skip +[!cgo] skip + +# clear CC, in case user sets it +env CC= + +env CGO_ENABLED=1 + +env GOARCH=amd64 +go build -n -x c.go +stderr 'clang.*-arch x86_64' + +env GOARCH=arm64 +go build -n -x c.go +stderr 'clang.*-arch arm64' + +-- c.go -- +package main + +import "C" + +func main() {} |