krzyzanowskim / OpenSSL

OpenSSL package for SwiftPM, CocoaPod, and Carthage, multiplatform
https://swift.best
Other
928 stars 340 forks source link

Apple Silicon (arm64) and iphone-simulator builds #194

Closed wyllys66 closed 8 months ago

wyllys66 commented 8 months ago

When building and developing on Apple Silicon (M1/2/3 arm64 arch), I want to build the iphone-simulator openssl libraries only for arm64, but the build fails because lipo doesn't want to put the same arch into the archive more than once.

If I default to building the x86_64 version of the iphone-simulator libraries, it forces me to have to use Rosetta when running the simulators which is not ideal and I'd like to avoid.

Is there a way to build only the arm64 architecture for both the simulator builds and the non-simulator builds? Or perhaps for these all-ARM64 builds, I don't need the simulator builds to be included at all? It's not obvious the best way to proceed.

krzyzanowskim commented 8 months ago

use xcframework that solves that problem. the script builds xcframework for you.

wyllys66 commented 8 months ago

Thanks, I'll try that.