Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: Cross compiling Go c archives for iOS does not generate bitcode #12682

Closed
swisspol opened this issue Sep 18, 2015 · 4 comments
Closed
Milestone

Comments

@swisspol
Copy link

Go 1.5.1 on OS X 10.10.5 with Xcode 7

Even if setting CC and CXX to include -fembed-bitcode while building against the iPhoneOS SDK, the resulting static library does not contain bitcode.

I made a sample test project here: https://github.com/swisspol/Go-Bridge

@ianlancetaylor ianlancetaylor changed the title Cross compiling Go c archives for iOS does not generate bitcode cmd/go: Cross compiling Go c archives for iOS does not generate bitcode Sep 19, 2015
@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Sep 19, 2015
@minux
Copy link
Member

minux commented Sep 19, 2015

The Go toolchain doesn't generate LLVM bitcode.
so unfortunately there is nothing to do here.

LLVM bitcode format is unstable, so pretty much you've
to use LLVM to generate bitcode. But the gc toolchain
will definitely use LLVM.

@minux minux closed this as completed Sep 19, 2015
@swisspol
Copy link
Author

I figured as much with the new Go toolchain. That might turn into a major problem going forward though, assuming Go wants to support mobile development on iOS (which is I assume the intent of https://github.com/golang/mobile/).

Bitcode is part of the new app thining, and submission to the App Store for WatchOS apps must already be in bitcode. It's currently optional for iOS apps, but maybe it will be required for iOS 10 next year. I would bet that it is at most 2 years away. Apple has a long history of architecture transitions and they are typically quite aggressive as well.

PS: What do you mean by the "gc toolchain"?

@minux
Copy link
Member

minux commented Sep 19, 2015 via email

@swisspol
Copy link
Author

Got it, thanks.

@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants