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

Merged
merged 6 commits into from
Oct 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Contributor 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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm. CMAKE_SHARED_LINKER_FLAGS needed to be exactly as I quoted (it's already a linker flag so -Wl is redundant... Odd that it didn't error out in CI or local builds as I'm sure it did for me on the 2.5.x branch. Anyways hopefully with that editted this PR should be doing the correct thing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, that builds on MacOS and Windows but not Ubuntu... yay for consistency.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, you added it to cflags, not the Cmake arguments...

'-DBORINGSSL_SHARED_LIBRARY',
'-DBORINGSSL_IMPLEMENTATION',
'-DOPENSSL_SMALL',
Expand Down
Loading