MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
942 stars 132 forks source link

xcFrameworks: Set force flag on static libs #739

Open dasisdormax opened 11 months ago

dasisdormax commented 11 months ago

Description

This sets the force flag on static libraries included from an xcFramework.

My Reasoning

My project uses ZSTD included as a static library and I recently tried to switch it from a regular lib to an xcframework (for arm-simulator support). Without this, the ZSTD symbols would be missing from the binary.

This is the minimal implementation that works with my setup. If you think a 'force' option on the xcframework path is needed instead, I could implement that instead.

dkimitsa commented 10 months ago

hi, we should not force all static libs unconditionally. for classic libs there was standalone flag for this. To make sure you symbols are not stripped you should keep them as export symbols, here is an example for FB: https://github.com/dkimitsa/robovm-robopods/blob/alt/facebook/ios-core/src/main/robopods/META-INF/robovm/ios/robovm.xml