-
Notifications
You must be signed in to change notification settings - Fork 433
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
[Question] Is it possible to create a shared library/framework that works in both iOS and MacOs arm64? #124
Comments
impossible afaik because libraries contain platform info which they were built against. Sample output from
|
also check this: https://bogo.wtf/arm64-to-sim-dylibs.html |
Ok, let's assume having cross iOS/macos binaries is not feasible. My point was trying to reduce compilation times by reducing the build matrix of a complex project that has many open source 3rd party dependencies (9 deps and still growing...). If I have to support both macos and iOS experience + simulators (no watch/tv OSes) this means, using @leetal architectures: MAC (macox_x86_64) If I could create arm64 macos framework and hack them to work in the simulator, and the hack is easily scriptable, I could technically have one arch less to compile project+dependencies. If I could similarly hack a x86_64 macos framework to work in the simulator that would mean in total 2 architectures less to compile. This is definitely out of project purpose but if @leetal has other suggestions as well that would be very appreciated. In the mean time I can verify if the hacks work. |
I was wondering if it could be theoretically possible for XCode to produce non-FAT binaries that works in both iOS/MacOS. Provided there's an ABI that works in both the operating systems and that the binaries only use hardware instructions/OS API(s) that are available in both CPU/OS(es), this would be feasible and would help reducing the matrix of builds to support. The question is if such cross-platform target actually exists and can be used in XCode toolchains hence ios-cmake.
The text was updated successfully, but these errors were encountered: