@@ -90,12 +90,30 @@ The `GOARCH` placeholder expands to the `GOARCH` under build.
9090
9191Only a single ` output ` directive may be found in a package.
9292
93+ # Differences to ` go build `
94+
95+ As multibuild is a wrapper around ` go build ` , most of the behaviour you will see come from there.
96+ This section is an attempt to document the areas where there are differences, and why.
97+
98+ ## Verbose
99+
100+ multibuild adds its own verbose output indicating when different targets start/finish if you pass ` -v ` .
101+
102+ ## Output Prefixing
103+
104+ Output from all builds is prefixed with ` GOOS/GOARCH: ` , e.g. instead of ` go build saying stuff ` ,
105+ you will see ` linux/arm64: go build saying stuff ` .
106+
107+ I think this is generally useful, and the only way to get sane output you can act on,
108+ so there is no configuration knob to disable it at this time.
109+
93110## Cgo
94111
95112Since the primary purpose of ` multibuild ` is to cross compile, the use of cgo isn't really
96113something I have thought about or focused on: I personally just switch it off and call it a day,
97- so that my binaries run in more places. This is one place I have chosen to differ from ` go build ` :
98- ` multibuild ` will force ` CGO_ENABLED=0 ` by default.
114+ so that my binaries run in more places.
115+
116+ So ` multibuild ` forces ` CGO_ENABLED=0 ` by default.
99117
100118This choice might not be for everyone, though, so ` multibuild ` will not complain if you explicitly
101119choose to enable it, e.g. by running ` CGO_ENABLED=1 go tool multibuild ` .
0 commit comments