openssl / openssl

TLS/SSL and crypto library

Home Page:https://www.openssl.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shared library should be allowed for iOS

Hsilgos opened this issue · comments

Hi,

We're trying to switch from our CMake based build system to openssl's native build system. We build openssl on several platforms and currently I see a small issue.

Shared openssl for iOS was disabled with this commit: aa58071

The description claims that "iOS doesn't have the concept of shared libraries", what is wrong. One may build shared library and use it as part of a framework. Also dependant frameworks may reuse shared libraries from framework on which it depends.

@dominicletz , could you comment?

@Hsilgos You beat me to it. I was just about to make the same comment. There may be a valid reasons for disabling building a shared library on iOS but it is definitely not that shared libraries (.dylibs) are not a concept on iOS. There are restrictions but they are supported as long as they are packaged as Frameworks. See the Embedded .dylib Files section of Embedding Frameworks In An App

It's odd the PR which introduced change does not provide any details on reasons. If I revert the change and do build on macos all tests still pass.

Also as I understand this is disabled only for iOS simulator because I may build dylib for ios device with ios64-cross

@Hsilgos you may know more about iOS here than me. I've added the fix primarily to re-enable the static libs, which where disabled before with engine being listed in disabled. The shared I disabled because the direct linking with the .so file didn't work compiling for iOS (and if I remember correctly that made the make build process fail building the demos/tests as they tried to link against the .so library which the simulator compiler didn't allow). That said this is ~3 years and a couple of xcode versions ago.