mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix RCT-Folly build error when use_frameworks! and hermes are both enabled (#34030)
Summary: This PR is fixing the build errors on iOS when `use_frameworks!` and `:hermes_enabled` are both enabled. There are two errors: - fmt/compile.h include not found: This PR adds fmt in header search paths. - undefined symbols `_jump_fcontext` and `_make_fcontext` from boost. the two symbols are actually not be unused. because to generate the shared library in dynamic framework mode, LTO (Link-Time-Optimization) is not as powerful as generating a single executable. ## Changelog [iOS] [Fixed] - Fix RCT-Folly build error when use_frameworks! and hermes are both enabled Pull Request resolved: https://github.com/facebook/react-native/pull/34030 Test Plan: - CI passed - ``` $ npx react-native init RN069 --version next # edit RN069/ios/Podfile to enable use_frameworks! and hermes_enabled # patch node_modules/react-native from both https://github.com/facebook/react-native/issues/34011 and this prs' patch $ pod install $ yarn ios ``` Reviewed By: cortinico Differential Revision: D37284084 Pulled By: dmitryrykun fbshipit-source-id: 923fa03d7844d1d227880919c8b2c8614c848d59
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e5c5dcd9e2
commit
79baca678a
@@ -75,7 +75,10 @@ Pod::Spec.new do |spec|
|
||||
spec.libraries = "c++abi" # NOTE Apple-only: Keep c++abi here due to https://github.com/react-native-community/releases/issues/251
|
||||
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include/\"" }
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include/\" \"$(PODS_ROOT)/fmt/include\"",
|
||||
# In dynamic framework (use_frameworks!) mode, ignore the unused and undefined boost symbols when generating the library.
|
||||
"OTHER_LDFLAGS" => "\"-Wl,-U,_jump_fcontext\" \"-Wl,-U,_make_fcontext\""
|
||||
}
|
||||
|
||||
# TODO: The boost spec should really be selecting these files so that dependents of Folly can also access the required headers.
|
||||
spec.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"" }
|
||||
|
||||
Reference in New Issue
Block a user