Fix/android 16kb alignment - #67
Closed
danielealbano wants to merge 2 commits into
Closed
Conversation
Android 15+ requires ELF shared libraries to have 16KB-aligned PT_LOAD segments. The Rust linker defaults to 4KB alignment. This adds the -z max-page-size=16384 linker flag for both aarch64 and x86_64 Android targets.
Add -A dead_code and -A mismatched_lifetime_syntaxes to rustflags for all targets. These warnings come from upstream source and auto-generated jaffi code that we don't modify.
Contributor
|
@danielealbano Would you mind rebasing on or merging |
Author
|
Super! Sure thing but will do the same change on a different pr, I am using this branch / commit as submodule. |
Contributor
|
That's fine with me. Should I close this one then @danielealbano , or leave it open for now? |
Author
|
Closing it, I will try to make the new one over the weekend (I have been super busy at work 🤦). |
Contributor
|
No rush! I appreciate you taking the time |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The newer versions of Android require 16KB native libraries, this PR update the build options in cargo for ngrok-rust to produce 16kb aligned so native libraries.
In addition mute a number of warnings.
Not sure if this PR will ever be merged but it might be useful for other people facing the same issue.