...

Text file src/cmd/go/testdata/script/build_darwin_cc_arch.txt

Documentation: cmd/go/testdata/script

     1# Test that we pass -arch flag to C compiler on Darwin (issue 43692).
     2
     3[!GOOS:darwin] skip
     4[!cgo] skip
     5
     6# clear CC, in case user sets it
     7env CC=
     8
     9env CGO_ENABLED=1
    10
    11env GOARCH=amd64
    12go build -n -x c.go
    13stderr 'clang.*-arch x86_64'
    14
    15env GOARCH=arm64
    16go build -n -x c.go
    17stderr 'clang.*-arch arm64'
    18
    19-- c.go --
    20package main
    21
    22import "C"
    23
    24func main() {}

View as plain text