Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

No embedded bitcode for android native binaries #2963

Closed
pgarba opened this issue May 12, 2019 · 6 comments
Closed

No embedded bitcode for android native binaries #2963

pgarba opened this issue May 12, 2019 · 6 comments

Comments

@pgarba
Copy link

pgarba commented May 12, 2019

Hi,

I played with kotlin native and discovered that its not possible to embed the llvm bitcode into the output binary for Android. The reason is that the kotlin native toolchain is using llvm-lto to link the bitcode objects and apply LTO. Is there a reason why you use llvm-lto instead of clang with the -flto option ?!

The problem is that the "-fembed-bitcode" option is implemented in clang itself instead of llvm so choosing llvm-lto to to apply lto on the binaries will never be able to embed the bitcode into the objects.

Here in Thales we develop some tools that make use of the embedded bitcode. Thats why it would be great to find a solution for this.

Thanks,
Peter

@sbogolepov
Copy link
Contributor

Hello.
We are going to switch from llvm-lto to clang quite soon, stay tuned :)

@pgarba
Copy link
Author

pgarba commented May 13, 2019

That’s great news. Would it be possible to also have a setting to enable the embedded bitcode like we have for iOS?!

embedBitcode "bitcode" // for release binaries.

@olonho
Copy link
Contributor

olonho commented May 13, 2019

What exactly are your scenarious of LLVM bitcode usage?

@pgarba
Copy link
Author

pgarba commented May 14, 2019

Can I contact you by mail to discuss this further ?

@olonho
Copy link
Contributor

olonho commented May 14, 2019

Sure, or use PM in public Slack (@olonho).

@sbogolepov
Copy link
Contributor

Replacing this issue with KT-42700 because we are migrating to YouTrack.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants