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

[RN][iOS] Fix compiler flags passed to libraries #43088

Merged

Conversation

cipolleschi
Copy link
Contributor

@cipolleschi cipolleschi commented Feb 19, 2024

Summary:

Thanks to this issue and this PR in react-native-webview, we discovered that the compiler_flags that we were passing to a library that was using install_modules_dependencies were not correct when the RCT_NEW_ARCH_ENABLED flag was set.

With this change, we make sure that, when this flag is turned on, we pass the -DRCT_NEW_ARCH_ENABLED flag to the library.

Changelog:

[iOS][Fixed] - properly pass the -DRCT_NEW_ARCH_ENABLED=1 flag to libraries that use install_modules_dependencies

Test Plan:

Tested locally by:

  1. creating a new app with 0.73
  2. adding react-native-webview
  3. seeing that the destroyWebView method was greyed out (not compiled)
  4. applying the changes
  5. rebuild and see that the destroyWebView method was not greyed out anymore (compiled).
  6. Running the app and verifying that the debugger was stepping into the function.
BEFORE AFTER
Screenshot 2024-02-19 at 11 34 10 Screenshot 2024-02-19 at 11 32 00

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,500,344 -9,385,402
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,754,927 -11,485,153
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: cb307b9
Branch: main

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. p: Facebook Partner: Facebook Partner Pick Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants