Skip to content

Commit

Permalink
Enable 16KB page size binaries for RN libraries + hermes (#1557)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1557

X-link: facebook/react-native#47042

Add native build flags to support 16KB page size

- https://developer.android.com/guide/practices/page-sizes#compile-r27-higher

Changelog:
[Android][Added] add cmake arguments to support 16KB page size for native libraries

Reviewed By: cortinico

Differential Revision: D64446876

fbshipit-source-id: 5c6b7874a8837c7ebc9b3e9267ce11fb152bf535
  • Loading branch information
alanleedev authored and facebook-github-bot committed Nov 1, 2024
1 parent a2b862e commit e3aec0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ jobs:
test-e2e:
runs-on: ubuntu-22.04
env:
ANDROID_NDK: /usr/local/lib/android/sdk/ndk/26.1.10909125
ANDROID_NDK: /usr/local/lib/android/sdk/ndk/27.1.12297006
HERMES_WS_DIR: /home/runner/work/hermes
REACT_NATIVE_OVERRIDE_HERMES_DIR: /home/runner/work/hermes/hermes
steps:
Expand All @@ -534,7 +534,7 @@ jobs:
uses: ReactiveCircus/[email protected]
with:
api-level: 29
ndk: 26.1.10909125
ndk: 27.1.12297006
cmake: 3.22.1
script: |
cd ../react-native && ./gradlew -PreactNativeArchitectures=x86 :packages:rn-tester:android:app:installHermesRelease
Expand All @@ -544,7 +544,7 @@ jobs:
runs-on: ubuntu-22.04
env:
HERMES_WS_DIR: /home/runner/work/hermes
ANDROID_NDK: /usr/local/lib/android/sdk/ndk/26.1.10909125
ANDROID_NDK: /usr/local/lib/android/sdk/ndk/27.1.12297006
steps:
- name: Checkout Hermes
uses: actions/[email protected]
Expand Down
1 change: 1 addition & 0 deletions android/hermes/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ android {

externalNativeBuild {
cmake {
arguments "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
arguments "-DHERMES_IS_ANDROID=True"
arguments "-DHERMES_FACEBOOK_BUILD=${rootProject.ext.facebookBuild}"
arguments "-DANDROID_STL=c++_shared"
Expand Down

0 comments on commit e3aec0f

Please sign in to comment.