aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/build_darwin_cc_arch.txt
blob: 2b81b4cf80b6968a022dcbf526680690714b840d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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() {}