-
Notifications
You must be signed in to change notification settings - Fork 148
Support cross-compilation for iOS #60
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
763ab3e
boring-sys: Pull Android CMake params into a function
ilammy 96b0926
boring-sys: Pull iOS CMake params into a function
ilammy bed9c04
boring-sys: Use TARGET to determine iOS CMake params
ilammy 0f2d347
boring-sys: Support "aarch64-apple-ios-sim" targets
ilammy 1e748d2
boring-sys: Pass "-isysroot" to bindgen for iOS builds
ilammy 5c6caf7
boring-sys: Configure "rustc-cdylib-link-arg" only for macOS targets
ilammy 76a2d6c
boring-sys: Disable alignment tests for iOS ARM64 targets
ilammy 1e31482
ci: Don't run tests when targeting iOS
ilammy c4e7827
ci: Test builds for iOS targets
ilammy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? If it's because the tests were failing, why didn't they fail before this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not possible to run
cargo testwhen building for iOS. It would produce test binaries, but they can't be executed on the host macOS. You'd need to start an iOS Simulator, wrap the binaries into iOS apps, upload the apps to the simulator, run them there, extract results, and post those back. That's too much hassle. I believe it's okay to skip this step until Rust ecosystem catches up.So for iOS builds the tests are skipped, only checking that
boring-sysis able to compile BoringSSL and that rustc can compile Rust code that should be using the library.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this reminds me. When CI does
cargo test, it compiles for the host. That is, I believe that tests for Android targets are actually testing on the host Linux – not the Android 🤔I guess I'll make another change to the CI to unify tests into three groups:
Ugh. When I added
--targetto other tests, basically only "stable", "macos-x86_64", "i686-msvc", "x86_64-msvc" ended up working. Everything else fails for one reason or the other: missing compilers, wrong linkers, etc.