diff options
| author | Elias Naur <mail@eliasnaur.com> | 2019-03-19 13:19:48 +0200 |
|---|---|---|
| committer | Elias Naur <mail@eliasnaur.com> | 2019-03-21 08:41:51 +0000 |
| commit | 277609f844ed9254d25e975f7cf202d042beecc6 (patch) | |
| tree | 5dddab0e2f1aa96a8f1ab1b334e1d567776c27c2 /src/os/exec/exec.go | |
| parent | 0fe1986a72ea578390d4909988a1d7cb3a687544 (diff) | |
| download | go-277609f844ed9254d25e975f7cf202d042beecc6.tar.xz | |
cmd/link/internal/ld: copy Mach-O platform version commands to go.o
To build for watchOS and tvOS the Apple toolchain requires a Mach-O
load command that matches the platform for all object files in a build.
The go.o object file produced by the Go linker contains no such command.
The loader commands are mutually exclusive so we need to pick the
right one. Fortunately, cgo must be enabled for watchOS and tvOS to
be useful, so we can copy the first loader command we find in the object
files produced by the host compiler.
Add a test that builds a small program for tvOS to test both this CL
and the previous CL that added bitcode support.
Updates #22395
Change-Id: I7a47d19be9d80f0459dc358c600cddd9f236c444
Reviewed-on: https://go-review.googlesource.com/c/go/+/168321
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/os/exec/exec.go')
0 files changed, 0 insertions, 0 deletions
