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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Hermes no longer builds without Exception.cpp (#982) #1021

merged 1 commit into from Feb 14, 2022


Copy link

@tido64 tido64 commented Feb 14, 2022

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 馃憤
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 馃憤
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native


react-native-macos fails to build if Hermes is enabled:

Undefined symbols for architecture x86_64:
  "folly::exception_ptr_get_type(std::exception_ptr const&)", referenced from:
      folly::exception_wrapper::ExceptionPtr::type_(folly::exception_wrapper const*) in libRCT-Folly.a(ExceptionWrapper.o)
      folly::exceptionStr(std::exception_ptr const&) in libRCT-Folly.a(ExceptionString.o)
  "folly::exception_ptr_get_object(std::exception_ptr const&, std::type_info const*)", referenced from:
      std::exception* folly::exception_ptr_get_object<std::exception>(std::exception_ptr const&) in libReact-hermes.a(Connection.o)
      std::exception* folly::exception_ptr_get_object<std::exception>(std::exception_ptr const&) in libRCT-Folly.a(ExceptionWrapper.o)
      std::exception* folly::exception_ptr_get_object<std::exception>(std::exception_ptr const&) in libRCT-Folly.a(ExceptionString.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Resolves #214
Resolves #952

This PR just replicates cherry-picking the commit already on master: 1e441a0


[macOS] [Fixed] - Hermes no longer builds without Exception.cpp

Test Plan

npm run set-react-version 0.66
cd example
rm -rf macos/Pods macos/Podfile.lock
# apply this patch manually in node_modules folder
# enable Hermes in `macos/Podfile`
pod install --project-directory=macos
yarn macos


kelset approved these changes Feb 14, 2022
@tido64 tido64 merged commit bb08860 into 0.66-stable Feb 14, 2022
11 checks passed
@kelset kelset deleted the tido/fix-hermes-build-0.66 branch Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants