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

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

View as plain text