-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Do not build JSI in React-jsi when Hermes is enabled, resolve JSI ODR violation #35038
Conversation
Differential Revision: D40442603 fbshipit-source-id: 1690377f76bc7227a1e77e542059e6efac259b47
Summary: The React-Hermes and hermes-engine headers are only needed when Hermes is enabled. Changelog: [internal] Differential Revision: D40451162 fbshipit-source-id: bdebd418aeb36254fbaabfa460dacf86e7cb1f3a
Summary: Move JSC and Hermes CocoaPods configuration to scripts/cocoapods/jsengine.rb. This file provides a setup_jsc function and a setup_hermes function. Changelog: [internal] Differential Revision: D40459234 fbshipit-source-id: bd76472ef604ec6b930d7e353eba61f7a962103d
… violation Summary: React-jsi provides JSI to allow React Native to interface with JavaScriptCore. The hermes-engine Pod provides a second copy of JSI, as Hermes is built and linked statically with JSI. This second copy of JSI would lead to an [ODR Violation](https://en.cppreference.com/w/cpp/language/definition). To resolve this, when Hermes is enabled: - React-hermes and hermes-engine are installed. - React-jsc is not installed. - React-jsi continues to be installed. - React-jsi will not build JSI. - React-jsi will declare a dependency on hermes-engine. The result is that the JSI dependency for React Native is satisfied by hermes-engine, and there is no duplicate JSI library in the project. When Hermes is disabled: - React-jsi and React-jsc are installed. - React-hermes and hermes-engine are not installed. - React-jsi will build JSI. Changelog: [iOS][Changed] Resolve JSI ODR violation, make hermes-engine the JSI provider when Hermes is enabled Reviewed By: cipolleschi Differential Revision: D40334913 fbshipit-source-id: c108f258dfe9eefb5b755bc38dc63eea9f3a02b3
This pull request was exported from Phabricator. Differential Revision: D40334913 |
Base commit: be6f656 |
Base commit: be6f656 |
PR build artifact for a5f3728 is ready. |
PR build artifact for a5f3728 is ready. |
This pull request was successfully merged by @hramos in a68c418. When will my fix make it into a release? | Upcoming Releases |
… violation (facebook#35038) Summary: Pull Request resolved: facebook#35038 React-jsi provides JSI to allow React Native to interface with JavaScriptCore. The hermes-engine Pod provides a second copy of JSI, as Hermes is built and linked statically with JSI. This second copy of JSI would lead to an [ODR Violation](https://en.cppreference.com/w/cpp/language/definition). To resolve this, when Hermes is enabled: - React-hermes and hermes-engine are installed. - React-jsc is not installed. - React-jsi continues to be installed. - React-jsi will not build JSI. - React-jsi will declare a dependency on hermes-engine. The result is that the JSI dependency for React Native is satisfied by hermes-engine, and there is no duplicate JSI library in the project. When Hermes is disabled: - React-jsi and React-jsc are installed. - React-hermes and hermes-engine are not installed. - React-jsi will build JSI. Changelog: [iOS][Changed] Resolve JSI ODR violation, make hermes-engine the JSI provider when Hermes is enabled Reviewed By: cipolleschi Differential Revision: D40334913 fbshipit-source-id: 409407a193a35cbd21b0e8778537b3627e4c54a2
…1499) Summary: After facebook#38922 we consume JSI from `ReactCommon/jsi`, and ignore JSI that is distributed with `hermes-engine`. This diff removes `include/jsi` from `source_files` of `hermes-engine` so we don't get two sets of JSI headers - one from `ReactCommon`, and the other one from `hermes-engine`. This diff also fixes accidental breakage of ODR violation, which was first fixed here facebook#35038 We will no longer compile JSI into `react-native` when linking against `hermes-engine`, which already has JSI in it. Changelog: [iOS][Fixed] - Exclude JSI headers when using hermes-engine prebuilt. Differential Revision: D51347562
Summary:
React-jsi provides JSI to allow React Native to interface with JavaScriptCore.
The hermes-engine Pod provides a second copy of JSI, as Hermes is built and linked statically with JSI.
This second copy of JSI would lead to an ODR Violation.
To resolve this, when Hermes is enabled:
The result is that the JSI dependency for React Native is satisfied by hermes-engine, and there is no duplicate JSI library in the project.
When Hermes is disabled:
Changelog:
[iOS][Changed] Resolve JSI ODR violation, make hermes-engine the JSI provider when Hermes is enabled
Reviewed By: cipolleschi
Differential Revision: D40334913