Commit Graph

31 Commits

Author SHA1 Message Date
Davide De Rosa 0c61811aed Produce XCFramework from per-platform frameworks
1. Produce one framework per platform
2. Merge archs (lipo) into same platform framework
3. Assemble fat frameworks into XCFramework

For more information:

- https://github.com/balthisar/openssl-xcframeworks
- https://developer.apple.com/forums/thread/666335
2020-11-14 16:51:24 +01:00
Davide De Rosa 2f5cdaf136 Clean up platforms
- Rename WatchOS platform to Watch
- Drop Apple Watch armv7k
- Use "MacOSX" sys_id in targets .conf
2020-11-14 15:42:00 +01:00
Davide De Rosa 506c071196 Add macOS Catalyst support
Backported from fork:

- https://github.com/balthisar/openssl-xcframeworks
2020-11-07 13:21:31 +01:00
Andreas Verhoeven a8745f135e Adds support for WatchOS Simulator on Xcode 12 (x86_64) 2020-10-14 16:49:39 +02:00
Davide De Rosa 12b74f9064
Merge pull request #16 from ilammy/configure-min-sdk
Accurate version bookkeeping
2020-05-24 00:03:28 +02:00
Davide De Rosa 3d03ccc56a Normalize OpenSSL version for App Store 2020-05-12 12:40:37 +02:00
Alexei Lozovsky fb997dc62f Set OpenSSL version in CFBundleShortVersionString
Some vulnerability analysis tools look at this 'marketing version'
string to determine the version of OpenSSL library. Keep the actual
version there to make the tools happy. Otherwise they tend to treat
OpenSSL 1.0 to be massively vulnerable.

Since we don't have access to OPENSSL_VERSION from build-libssl.sh,
extract the version from OpenSSL header files.
2020-05-09 18:32:47 +03:00
Alexei Lozovsky 5d14c91074 Set accurate minimum SDK version in Info.plist
It is also necessary to set matching minimum SDK version in Info.plist
file of the frameworks. Extract the version and replace it in Info.plist
by pattern.
2020-05-09 18:26:27 +03:00
Alexei Lozovsky 54315154fb Set accurate minimum SDK version in dylibs
We should set accurate minimum SDK version in produced dylibs. Otherwise
the individual versions of object files are ignored and we end up with
a file that may have higher minimum SDK version than requested.

Since here we don't have access to *_MIN_SDK_VERSION variables set in
build-libssl.sh, retrieve the minimum SDK version from the object files.
This give accurate information. Parse "otool -l" output for that. It's
more or less simple, once you account for peculiarities.
2020-05-09 18:26:18 +03:00
Alexei Lozovsky 113509896b Don't symlink macOS framework if not building it
If we are not building macOS targets then the framework has not been
created and we not should go ahead with creating symlinks in it. Check
whether the framework directory is there, if it's not then don't attempt
to create symlinks.
2020-05-09 15:40:37 +03:00
Davide De Rosa c57fea7d24 Reproduce expected hierarchy for macOS frameworks 2019-09-26 09:53:13 +02:00
Davide De Rosa 78a70f645d Add WatchOS targets to build script
Squash commits by ezathashim <ezathashim@mac.com>
2019-09-26 09:39:59 +02:00
Davide De Rosa a6958f4c9b Default to 64-bit only
- Raise platform targets.
- Drop 32-bit OpenSSL targets.
- Default to 1.1.0
2018-09-26 13:04:51 +02:00
Davide De Rosa 2262160df5 Fix ld MIN_SDK for simulator targets
ld complains about mixing device and simulator objects in the
tvOS target. Reason is that "tvos_version_min" seems to imply a
device target, whereas simulator must use "tvos_simulator_version_min"
instead.

The stupid part of it is that ld displays a warning in iOS:

ld: warning: URGENT: -ios_version_min is invalid for architecture
x86/x86_64, inferring -ios_simulator_version_min. This will be an error
in the future.

whereas stops abruptly in tvOS:

ld: building for tvOS, but linking in object file built for tvOS
Simulator, file 'obj/a_d2i_fp.o' for architecture x86_64

ld should stop and avoid any poorly explained nonsense.
2018-09-24 13:59:07 +02:00
Davide De Rosa e455f1a1ae Add macOS archs/targets 2018-02-08 16:45:10 +01:00
Davide De Rosa ba666f2507 Use same condition order 2017-10-18 09:20:26 +02:00
Davide De Rosa 15d5c28c08 Restore pipefail by replacing grep -q
Tip by @nicph
2017-10-18 09:17:35 +02:00
Davide De Rosa 8fd9082487 Remove redundant -arch from Bitcode check 2017-10-18 09:12:55 +02:00
Davide De Rosa 684c23e565 Embed Bitcode in dynamic framework, improve script
https://github.com/keeshux/OpenSSL-Framework/pull/2

- Fix framework type check in check_bitcode()
- Disable pipefail as it seems to stop in otool when fw is static
2017-10-17 22:57:51 +02:00
Davide De Rosa a30ce62044 Use -syslibroot instead of raw -L for SDK ref 2017-10-14 18:40:53 +02:00
Davide De Rosa 0b43dc37cd Improve .dylib assembling log 2017-10-01 21:58:45 +02:00
Davide De Rosa 4dd2bd9d67 Specify -arch in ld to fix page size crash 2017-10-01 21:53:57 +02:00
Davide De Rosa 10b342fb7e Create frameworks for both iPhone and AppleTV 2017-10-01 21:53:50 +02:00
Davide De Rosa e62bdf0984 Create dynamic framework from arch dylibs 2017-10-01 21:53:26 +02:00
Stephen Hinton 3fbca9aee8 doesn't contains -> doesn't contain 2016-09-28 14:54:59 -05:00
Felix Schulze 0562fc6c61 Add check for bitcode 2016-09-18 20:07:59 +02:00
mconintet 59a52a1678 Fix file path
File path is not right if use this project as submodule like case in this project https://github.com/x2on/libssh2-for-iOS
2016-05-19 12:17:22 +08:00
Jason Lam 4f9af36def Update create-openssl-framework.sh
enable code sign for resultant openssl.framework , which is required for latest xCode and iOS
2015-12-28 16:21:22 +08:00
Felix Schulze 7346a5f9da Update create-openssl-framework.sh
Add `ios_version_min` - but doesn't work at the moment (see http://www.openradar.me/22104678)
Related #72
2015-11-25 13:48:56 +01:00
dapperstout b24d9a5333 Add support for creating a dynamically linked framework. 2015-05-05 20:25:00 +02:00
Pieter Claerhout 351c379210 Added a script to create a framework for openssl.
This makes it a lot easier to add this to another project.
2014-11-06 12:05:28 +01:00