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

gradle: add max-page-size 16384 #1213

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

smore-lore
Copy link

This uses Gradle 7, so must specify page size exactly, rather than being able to use the newer options.

This may not update the APK alignment, but you can always run zipalign to realign an unaligned APK. Or, if you pull the .so directly it will work.

This uses Gradle 7, so must specify page size exactly, rather
than being able to use the newer options.
    
This may not update the APK alignment, but you can always run
zipalign to realign an unaligned APK. Or, if you pull the .so
directly it will work.
@@ -60,6 +60,7 @@ if (androidSdkInstalled) {
"-DBORINGSSL_HOME=$boringsslHome",
"-DCMAKE_CXX_STANDARD=17"
cFlags '-fvisibility=hidden',
'-Wl,-z,max-page-size=16384',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest putting linker flags at the end of the list.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually turns out this isn't the way to do it with external cmake, only actual cflags can do in here.

You want to add '-DCMAKE_SHARED_LINKER_FLAGS=-z max-page-size=16384' to the cmake arguments.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, and thank you thank you, I had to do something slightly differently, but I think this should work now.

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.

2 participants