This includes original changes authored by Orfeas in the build script to
(re)include i386 support as well as updates in the OpenSSL.xcodeproj.
However, updates in binaries and frameworks have been removed as Marcin
would probably like to perform the update himself. This commit also
includes a minor fix in the Xcode project file that puts the new
"opensslconf-i386.h" header into the 'public headers' section so that
it's actually included into the produced frameworks.
Signed-off-by: Orfeas Zafeiris <orfeaz@gmail.com>
Signed-off-by: Alexei Lozovsky <alexei@cossacklabs.com>
This adds an Xcode project to build OpenSSL frameworks. Carthage build
system relies exclusively on Xcode projects so adding one adds support
for building with Carthage.
The changes are based off 1.0.2.14 branch and do not use existing
support scripts. Unfortunately, I could not find a way to reuse them
(but that should be the right way). On the flip side, it's now possible
to build framworks using "xcodebuild" from command-line.
The project is configured as follows:
- Two targets "OpenSSL (iOS)" and "OpenSSL (macOS)" which build
Cocoa Touch and (desktop) Cocoa frameworks respectively. They
support iOS 8.0+ and macOS 10.9+.
- Each target has a corresponding Xcode scheme that builds it.
The schemes are *shared* which is required for Carthage to work.
- Both do not compile any new code and only combine prebuilt
binaries already present in the repository.
Some interesting caveats about configuration:
- Resulting frameworks are called "openssl.framework" for the sake
of compatibility with existing header include usage like
"#include <openssl/evp.h>" with all lowercase. This plays better
with so-called 'modular includes' that are necessary to use the
framework from Swift code.
- Umbrella headers "openssl.h" are compiled manually because
apparently inclusion order is important for OpenSSL. This is
important for Swift compiler, but mostly irrelevant to both
Swift and Objective-C users.
- In order to preserve the symbols from libssl.a and libcrypto.a
we use a custom linker flag "-all_load". It keeps the 'unused'
symbols from being removed by the linker (which is the default
behavior)
- Speaking of linker flags, the frameworks are explicitly *not*
code-signed. This is expected for frameworks which should be
signed only by the end-users (the application). Xcode does not
make it easy (even now), but it seems I got it right...
And that's probably it for the project configuration.