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

Anyway to reduce binary size compiled with bitcode? #80

Open
myonlylonely opened this issue May 2, 2022 · 5 comments
Open

Anyway to reduce binary size compiled with bitcode? #80

myonlylonely opened this issue May 2, 2022 · 5 comments

Comments

@myonlylonely
Copy link

myonlylonely commented May 2, 2022

With bitcode compiled, the binary size is about 1 GB. Is there any way to reduce that size? I need to compile my App with bitcode, so I have to recompile MetalANGLE framework with bitcode, but the binary size is so big.

@kakashidinho
Copy link
Owner

Hi,
what did you do to change MetalANGLE to be compiled with bitcode? I believe the provided Xcode project already leaves the bitcode option as is (with default value = enabled). i.e. it is already compiled with bitcode.

Furthermore, are you using static library version of MetalANGLE?

@myonlylonely
Copy link
Author

Hi, what did you do to change MetalANGLE to be compiled with bitcode? I believe the provided Xcode project already leaves the bitcode option as is (with default value = enabled). i.e. it is already compiled with bitcode.

Furthermore, are you using static library version of MetalANGLE?

For a framework, that is not enough. I have to add some additional flags to make it work.
https://stackoverflow.com/questions/32868297/compiling-ios-library-with-bitcode-enabled

@kakashidinho
Copy link
Owner

That's new. I wasn't aware.
Btw, the bitcode binary size is not the final size. When you upload your binary to appstore, it should be compiled one more into native binary and the size should be reduced.

@myonlylonely
Copy link
Author

That's new. I wasn't aware. Btw, the bitcode binary size is not the final size. When you upload your binary to appstore, it should be compiled one more into native binary and the size should be reduced.

Yes, I know that doesn't affect the final size of the App. But it makes the upload process to Apple Store Connect very slow.

@danoli3
Copy link

danoli3 commented May 11, 2022

Just target arm64 with bitcode

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

No branches or pull requests

3 participants