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

Build RN Tester with CMake #33937

Closed
wants to merge 1 commit into from
Closed

Conversation

cortinico
Copy link
Contributor

Summary:
This moves the build of RNTester from Unix Make to CMake
This will serve as a blueprint for users that are looking into using CMake end-to-end in their buildls.

In order to make this possible I had to:

  • Add an Android-prebuilt.cmake file that works similar to the Android-prebuilt.mk for feeding prebuilt .so files to the consumer build.
  • Update the codegen to use JSI_EXPORT on several objects/classes as CMake has stricter visibility rules than Make
  • Update the sample native module in nativemodule/samples/platform/android/ to use CMake instead of Make

Changelog:
[Internal] [Changed] - Build RN Tester with CMake

Differential Revision: D36760309

Summary:
This moves the build of RNTester from Unix Make to CMake
This will serve as a blueprint for users that are looking into using CMake end-to-end in their buildls.

In order to make this possible I had to:
* Add an `Android-prebuilt.cmake` file that works similar to the `Android-prebuilt.mk` for feeding prebuilt .so files to the consumer build.
* Update the codegen to use `JSI_EXPORT` on several objects/classes as CMake has stricter visibility rules than Make
* Update the sample native module in `nativemodule/samples/platform/android/` to use CMake instead of Make

Changelog:
[Internal] [Changed] - Build RN Tester with CMake

Differential Revision: D36760309

fbshipit-source-id: b313f738ab5a8f8afb7319c3ccab559c40a28097
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels May 31, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D36760309

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: f4123b0
Branch: main

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,778,777 -9,467
android hermes armeabi-v7a 7,168,238 -23,587
android hermes x86 8,089,142 -10,456
android hermes x86_64 8,065,325 -11,778
android jsc arm64-v8a 9,646,839 -9,466
android jsc armeabi-v7a 8,405,211 -23,598
android jsc x86 9,598,017 -10,461
android jsc x86_64 10,191,253 -11,774

Base commit: f4123b0
Branch: main

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cortinico in f1c614b.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants