kakashidinho / metalangle

MetalANGLE: OpenGL ES to Metal API translation layer
Other
462 stars 65 forks source link

Anyway to reduce binary size compiled with bitcode? #80

Open myonlylonely opened 2 years ago

myonlylonely commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Just target arm64 with bitcode