]> Cypherpunks repositories - gostls13.git/commit
cmd/link/internal/ld: enable bitcode builds for iOS, tvOS, watchOS
authorElias Naur <mail@eliasnaur.com>
Sun, 17 Mar 2019 16:48:57 +0000 (17:48 +0100)
committerElias Naur <mail@eliasnaur.com>
Thu, 21 Mar 2019 01:34:26 +0000 (01:34 +0000)
commitba965640a45f5d94976c3ad6c92396cab539155a
tree0489e1660afd2712d75a22f0f600e63a9ead33d8
parent03a79e94ac72f2425a6da0b399dc2f660cf295b6
cmd/link/internal/ld: enable bitcode builds for iOS, tvOS, watchOS

The Go toolchain cannot output bitcode, but there is a trick where
object code can be marked with an __asm section, persuading the
Apple toolchain to include our object code in bitcode builds.

This enables Go builds with bitcode enabled; the next CL adds
the necessary plumbing for building on tvOS and watchOS.

Thanks to Aman Gupta for the trick.

Test is added two CLs from here.

Fixes #22395 (at least until Apple tightens bitcode requirements.)

Change-Id: Ic1c1448c4d46222bb3dd097b1f4df80848051e5f
Reviewed-on: https://go-review.googlesource.com/c/go/+/168320
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/ld/macho.go