Skip to content
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

[ios] Use build script for libcrypto #6645

Closed
wants to merge 1 commit into from
Closed

[ios] Use build script for libcrypto #6645

wants to merge 1 commit into from

Conversation

paw-hub
Copy link
Contributor

@paw-hub paw-hub commented Mar 1, 2024

Set up a submodule that tracks external build tools, and have a script automatically compile libcrypto for iOS Simulator (arm64/x86_64) and iOS (arm64).

Stop tracking the libcrypto binary in git.

Also stop using a .xcframework and just conditionally static-link the .a files depending on architecture, and use the include directory from the build tools.

Fixes #6603

@paw-hub
Copy link
Contributor Author

paw-hub commented Mar 1, 2024

Still some remaining questions:

  • Figure out a good way to avoid committing binaries?
  • The filename is OpenSSL.xcframework, not libcrypto.xcframework, but libssl.a was removed prior to creating this file, so it's not actually a part of the final archive. That said, the script for making the xcframework only seems to result in a OpenSSL.xcframework file. Is this OK?

@tutao-mac tutao-mac force-pushed the 6603-openssl branch 6 times, most recently from 389e34b to bb1866d Compare March 4, 2024 13:50
@paw-hub paw-hub marked this pull request as ready for review March 4, 2024 14:05
@paw-hub
Copy link
Contributor Author

paw-hub commented Mar 4, 2024

This seems to work well enough now that it can be reviewed.

That said, on our Mac Mini with Apple Silicon, initial builds take around 78 seconds longer due to having to compile OpenSSL three times (iOS on arm64 and iOS-Simulator on arm64/x86_64).

This isn't an issue for developers, since it only has to do this task once and subsequent builds are instant, but for making releases, is this an issue? Release builds already take a while, so it's not that much longer (relatively). We can probably improve this with some sort of caching (as @rezbyte suggested) if it's worth it.

@tutao-mac tutao-mac force-pushed the 6603-openssl branch 2 times, most recently from 62e35e3 to 1c578a5 Compare March 4, 2024 14:34
@paw-hub paw-hub changed the title [ios] Update OpenSSL to target arm64 simulator [ios] Use build script for libcrypto Mar 4, 2024
Set up a submodule that tracks external build tools, and have a script
automatically compile libcrypto for iOS Simulator (arm64/x86_64) and
iOS (arm64).

Stop tracking the libcrypto binary in git.

Also stop using a .xcframework and just conditionally static-link the
.a files depending on architecture, and use the include directory from
the build tools.

Fixes #6603
@charlag
Copy link
Contributor

charlag commented Mar 4, 2024

We can tell the builder to not wipe the repo if that helps. I think this isn't a bit issue

@charlag
Copy link
Contributor

charlag commented Mar 19, 2024

We probably need some test notes

@paw-hub
Copy link
Contributor Author

paw-hub commented Aug 7, 2024

Closed because we're removing libcrypto via #7344

@paw-hub paw-hub closed this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use tutasdk RSA impl for iOS and Android
3 participants