summaryrefslogtreecommitdiff
path: root/libgo/go/cmd/go/testdata/script/install_cross_gobin.txt
blob: 60aeed689f30dcc9f3d4c155e10d514688873434 (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
25
26
27
28
env GO111MODULE=off
[!short] skip # rebuilds std for alternate architecture

cd mycmd
go build mycmd

[gccgo] stop

# cross-compile install with implicit GOBIN=$GOPATH/bin can make subdirectory
env GOARCH=386
[386] env GOARCH=amd64
env GOOS=linux
go install mycmd
exists $GOPATH/bin/linux_$GOARCH/mycmd

# cross-compile install with explicit GOBIN cannot make subdirectory
env GOBIN=$WORK/bin
! go install mycmd
! exists $GOBIN/linux_$GOARCH

# installing standard command should still work
# (should also be mtime update only if cmd/pack is up-to-date).
! stale cmd/pack
[!short] go install cmd/pack

-- mycmd/x.go --
package main
func main() {}