Skip to content

Commit

Permalink
Upgrade folly to 2021.06.28.00 and boost to 1.76.0 (#31840)
Browse files Browse the repository at this point in the history
Summary:
1. [ios] upgrade folly to 2021.06.28.00 which aligned to android.
2. folly compile setting from c++14 -> c++17: _this folly requires c++17 for `std::unordered_map::insert_or_assign`._
3. boost 1.63.0 -> 1.76.0:  _the old boost does not support c++17._
4. deprecating react-native-community/boost-for-react-native: _by cocoapods installer, we could download the official target._

## Changelog

[iOS] [Changed] - Upgrade folly to 2021.06.28.00 and boost to 1.76.0

Pull Request resolved: #31840

Test Plan: CI passed

Reviewed By: fkgozali

Differential Revision: D29668480

Pulled By: yungsters

fbshipit-source-id: 98eae9ca47f489dcea91974e6f5e9dcb4d66c40c
  • Loading branch information
Kudo authored and facebook-github-bot committed Jul 16, 2021
1 parent 1465c8f commit b77948e
Show file tree
Hide file tree
Showing 29 changed files with 173 additions and 146 deletions.
2 changes: 1 addition & 1 deletion Libraries/Blob/React-RCTBlob.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTBlob"
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Image/React-RCTImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTImage"
Expand Down
2 changes: 1 addition & 1 deletion Libraries/LinkingIOS/React-RCTLinking.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTLinking"
Expand Down
2 changes: 1 addition & 1 deletion Libraries/NativeAnimation/React-RCTAnimation.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTAnimation"
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Network/React-RCTNetwork.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTNetwork"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTPushNotification"
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Settings/React-RCTSettings.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTSettings"
Expand Down
2 changes: 1 addition & 1 deletion Libraries/TypeSafety/RCTTypeSafety.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "RCTTypeSafety"
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Vibration/React-RCTVibration.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-RCTVibration"
Expand Down
4 changes: 2 additions & 2 deletions React-Core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

header_subspecs = {
Expand Down Expand Up @@ -48,7 +48,7 @@ Pod::Spec.new do |s|
s.header_dir = "React"
s.framework = "JavaScriptCore"
s.library = "stdc++"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"", "DEFINES_MODULE" => "YES" }
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-hermes\" \"${PODS_ROOT}/Headers/Public/hermes-engine\"", "DEFINES_MODULE" => "YES" }
s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""}
s.default_subspec = "Default"

Expand Down
2 changes: 1 addition & 1 deletion React/CoreModules/React-CoreModules.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "React-CoreModules"
Expand Down
2 changes: 1 addition & 1 deletion React/FBReactNativeSpec/FBReactNativeSpec.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'

Pod::Spec.new do |s|
s.name = "FBReactNativeSpec"
Expand Down
6 changes: 3 additions & 3 deletions React/React-RCTFabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end

folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand All @@ -37,8 +37,8 @@ Pod::Spec.new do |s|
s.header_dir = "React"
s.framework = "JavaScriptCore"
s.library = "stdc++"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" }
s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"",
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" }
s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"",
"OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags }

s.dependency "React-Core", version
Expand Down
2 changes: 1 addition & 1 deletion React/third-party.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
// LICENSE file in the root directory of this source tree.
//

HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2021.04.26.00 $(SRCROOT)/../third-party/glog-0.3.5/src
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2021.06.28.00 $(SRCROOT)/../third-party/glog-0.3.5/src
OTHER_CFLAGS = -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1
4 changes: 2 additions & 2 deletions ReactCommon/React-Fabric.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
folly_dep_name = 'RCT-Folly/Fabric'
boost_compiler_flags = '-Wno-documentation'

Expand Down Expand Up @@ -82,7 +82,7 @@ Pod::Spec.new do |s|
ss.source_files = "react/renderer/core/**/*.{m,mm,cpp,h}"
ss.exclude_files = "react/renderer/core/tests"
ss.header_dir = "react/renderer/core"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" }
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" }
end

s.subspec "componentregistry" do |ss|
Expand Down
4 changes: 2 additions & 2 deletions ReactCommon/ReactCommon.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand All @@ -32,7 +32,7 @@ Pod::Spec.new do |s|
s.source = source
s.header_dir = "ReactCommon" # Use global header_dir for all subspecs for use_frameworks! compatibility
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
"USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }

Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/callinvoker/React-callinvoker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand Down
6 changes: 3 additions & 3 deletions ReactCommon/cxxreact/React-cxxreact.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand All @@ -33,10 +33,10 @@ Pod::Spec.new do |s|
s.source_files = "*.{cpp,h}"
s.exclude_files = "SampleCxxModule.*"
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
s.header_dir = "cxxreact"

s.dependency "boost-for-react-native", "1.63.0"
s.dependency "boost", "1.76.0"
s.dependency "DoubleConversion"
s.dependency "RCT-Folly", folly_version
s.dependency "glog"
Expand Down
4 changes: 2 additions & 2 deletions ReactCommon/hermes/React-hermes.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand All @@ -36,7 +36,7 @@ Pod::Spec.new do |s|
s.public_header_files = "executor/HermesExecutorFactory.h"
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = {
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include\"",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/..\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/libevent/include\"",
"GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1",
}
s.header_dir = "reacthermes"
Expand Down
6 changes: 3 additions & 3 deletions ReactCommon/jsi/React-jsi.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand All @@ -33,11 +33,11 @@ Pod::Spec.new do |s|
s.exclude_files = "**/test/*"
s.framework = "JavaScriptCore"
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
s.header_dir = "jsi"
s.default_subspec = "Default"

s.dependency "boost-for-react-native", "1.63.0"
s.dependency "boost", "1.76.0"
s.dependency "DoubleConversion"
s.dependency "RCT-Folly", folly_version
s.dependency "glog"
Expand Down
4 changes: 2 additions & 2 deletions ReactCommon/jsiexecutor/React-jsiexecutor.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand All @@ -31,7 +31,7 @@ Pod::Spec.new do |s|
s.source = source
s.source_files = "jsireact/*.{cpp,h}"
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" }
s.header_dir = "jsireact"

s.dependency "React-cxxreact", version
Expand Down
4 changes: 2 additions & 2 deletions ReactCommon/react/renderer/graphics/React-graphics.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand All @@ -36,7 +36,7 @@ Pod::Spec.new do |s|
"platform/android",
"platform/cxx"
s.header_dir = "react/renderer/graphics"
s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/../../../\" \"$(PODS_ROOT)/RCT-Folly\"" }
s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_TARGET_SRCROOT)/../../../\" \"$(PODS_ROOT)/RCT-Folly\"" }

s.dependency "RCT-Folly/Fabric", folly_version
end
2 changes: 1 addition & 1 deletion ReactCommon/reactperflogger/React-perflogger.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
end

folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2021.04.26.00'
folly_version = '2021.06.28.00'
boost_compiler_flags = '-Wno-documentation'

Pod::Spec.new do |s|
Expand Down
Loading

0 comments on commit b77948e

Please sign in to comment.