Skip to content

Commit 69c5e9e

Browse files
alanleedevfacebook-github-bot
authored andcommitted
bump Folly to 2024.10.14.00 (#47033)
Summary: Pull Request resolved: #47033 Lastest Folly has updates to fix build errors with LLVM 19 which is also llikely needed for NDK 27 - facebook/folly@bf46c8a - also add folly's new dependency fast_float Changelog: [General][Changed] - Bump Folly to 2024.10.14.00 Reviewed By: cortinico Differential Revision: D64372125
1 parent 4c37431 commit 69c5e9e

34 files changed

+369
-205
lines changed

packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ header_search_paths = [
3232
"$(PODS_ROOT)/Headers/Private/React-Core",
3333
"$(PODS_ROOT)/boost",
3434
"$(PODS_ROOT)/DoubleConversion",
35+
"$(PODS_ROOT)/fast_float/include",
3536
"$(PODS_ROOT)/fmt/include",
3637
"$(PODS_ROOT)/RCT-Folly",
3738
"${PODS_ROOT}/Headers/Public/FlipperKit",

packages/react-native/Libraries/Blob/React-RCTBlob.podspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ header_search_paths = [
2424
"\"$(PODS_ROOT)/RCT-Folly\"",
2525
"\"$(PODS_ROOT)/boost\"",
2626
"\"$(PODS_ROOT)/DoubleConversion\"",
27+
"\"$(PODS_ROOT)/fast_float/include\"",
2728
"\"$(PODS_ROOT)/fmt/include\"",
2829
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
2930
]

packages/react-native/React-Core.podspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ folly_compiler_flags = folly_config[:compiler_flags]
2121
folly_version = folly_config[:version]
2222

2323
socket_rocket_config = get_socket_rocket_config()
24-
socket_rocket_version = socket_rocket_config[:version]
24+
socket_rocket_version = socket_rocket_config[:version]
2525

2626
boost_config = get_boost_config()
27-
boost_compiler_flags = boost_config[:compiler_flags]
27+
boost_compiler_flags = boost_config[:compiler_flags]
2828

2929
use_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == '1'
3030
use_hermes_flag = use_hermes ? "-DUSE_HERMES=1" : ""
@@ -50,6 +50,7 @@ header_search_paths = [
5050
"$(PODS_TARGET_SRCROOT)/ReactCommon",
5151
"$(PODS_ROOT)/boost",
5252
"$(PODS_ROOT)/DoubleConversion",
53+
"$(PODS_ROOT)/fast_float/include",
5354
"$(PODS_ROOT)/fmt/include",
5455
"$(PODS_ROOT)/RCT-Folly",
5556
"${PODS_ROOT}/Headers/Public/FlipperKit",

packages/react-native/React/CoreModules/React-CoreModules.podspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ folly_compiler_flags = folly_config[:compiler_flags]
2121
folly_version = folly_config[:version]
2222

2323
socket_rocket_config = get_socket_rocket_config()
24-
socket_rocket_version = socket_rocket_config[:version]
24+
socket_rocket_version = socket_rocket_config[:version]
2525

2626
header_search_paths = [
2727
"\"$(PODS_ROOT)/boost\"",
2828
"\"$(PODS_TARGET_SRCROOT)/React/CoreModules\"",
2929
"\"$(PODS_ROOT)/RCT-Folly\"",
3030
"\"$(PODS_ROOT)/DoubleConversion\"",
31+
"\"$(PODS_ROOT)/fast_float/include\"",
3132
"\"$(PODS_ROOT)/fmt/include\"",
3233
"\"${PODS_ROOT}/Headers/Public/ReactCodegen/react/renderer/components\"",
3334
]
@@ -47,7 +48,7 @@ Pod::Spec.new do |s|
4748

4849
s.ios.exclude_files = "PlatformStubs/**/*"
4950
exclude_files = ["RCTStatusBarManager.mm"]
50-
s.macos.exclude_files = exclude_files
51+
s.macos.exclude_files = exclude_files
5152
s.visionos.exclude_files = exclude_files
5253
s.tvos.exclude_files = exclude_files
5354

@@ -59,6 +60,7 @@ Pod::Spec.new do |s|
5960
}
6061
s.framework = "UIKit"
6162
s.dependency "DoubleConversion"
63+
s.dependency "fast_float", "6.1.4"
6264
s.dependency "fmt", "9.1.0"
6365
s.dependency "RCT-Folly", folly_version
6466
s.dependency "RCTTypeSafety", version

packages/react-native/React/React-RCTFabric.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ folly_config = get_folly_config()
2020
folly_compiler_flags = folly_config[:compiler_flags]
2121
folly_version = folly_config[:version]
2222
boost_config = get_boost_config()
23-
boost_compiler_flags = boost_config[:compiler_flags]
23+
boost_compiler_flags = boost_config[:compiler_flags]
2424
new_arch_flags = ENV['RCT_NEW_ARCH_ENABLED'] == '1' ? ' -DRCT_NEW_ARCH_ENABLED=1' : ''
2525

2626
header_search_paths = [
2727
"\"$(PODS_TARGET_SRCROOT)/ReactCommon\"",
2828
"\"$(PODS_ROOT)/boost\"",
2929
"\"$(PODS_ROOT)/DoubleConversion\"",
30+
"\"$(PODS_ROOT)/fast_float/include\"",
3031
"\"$(PODS_ROOT)/fmt/include\"",
3132
"\"$(PODS_ROOT)/RCT-Folly\"",
3233
"\"$(PODS_ROOT)/Headers/Private/React-Core\"",

packages/react-native/React/third-party.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
// LICENSE file in the root directory of this source tree.
99
//
1010

11-
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_83_0 $(SRCROOT)/../third-party/folly-2024.01.01.00 $(SRCROOT)/../third-party/glog-0.3.5/src
11+
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_83_0 $(SRCROOT)/../third-party/folly-2024.10.14.00 $(SRCROOT)/../third-party/glog-0.3.5/src
1212
OTHER_CFLAGS = -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1

packages/react-native/ReactAndroid/build.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ val prefabHeadersDir = project.file("$buildDir/prefab-headers")
6666
// Native versions which are defined inside the version catalog (libs.versions.toml)
6767
val BOOST_VERSION = libs.versions.boost.get()
6868
val DOUBLE_CONVERSION_VERSION = libs.versions.doubleconversion.get()
69+
val FAST_FLOAT_VERSION = libs.versions.fastFloat.get()
6970
val FMT_VERSION = libs.versions.fmt.get()
7071
val FOLLY_VERSION = libs.versions.folly.get()
7172
val GLOG_VERSION = libs.versions.glog.get()
@@ -183,6 +184,7 @@ val preparePrefab by
183184
// react_nativemodule_core
184185
Pair(File(buildDir, "third-party-ndk/boost/boost_1_83_0/").absolutePath, ""),
185186
Pair(File(buildDir, "third-party-ndk/double-conversion/").absolutePath, ""),
187+
Pair(File(buildDir, "third-party-ndk/fast_float/include/").absolutePath, ""),
186188
Pair(File(buildDir, "third-party-ndk/fmt/include/").absolutePath, ""),
187189
Pair(File(buildDir, "third-party-ndk/folly/").absolutePath, ""),
188190
Pair(File(buildDir, "third-party-ndk/glog/exported/").absolutePath, ""),
@@ -312,6 +314,28 @@ val prepareFolly by
312314
into("$thirdPartyNdkDir/folly")
313315
}
314316

317+
val downloadFastFloat by
318+
tasks.creating(Download::class) {
319+
dependsOn(createNativeDepsDirectories)
320+
src("https://github.com/fastfloat/fast_float/archive/v${FAST_FLOAT_VERSION}.tar.gz")
321+
onlyIfModified(true)
322+
overwrite(false)
323+
retries(5)
324+
quiet(true)
325+
dest(File(downloadsDir, "fast_float-${FAST_FLOAT_VERSION}.tar.gz"))
326+
}
327+
328+
val prepareFastFloat by
329+
tasks.registering(Copy::class) {
330+
dependsOn(if (dependenciesPath != null) emptyList() else listOf(downloadFastFloat))
331+
from(dependenciesPath ?: tarTree(downloadFastFloat.dest))
332+
from("src/main/jni/third-party/fast_float/")
333+
include("fast_float-${FAST_FLOAT_VERSION}/include/*", "CMakeLists.txt")
334+
eachFile { this.path = this.path.removePrefix("fast_float-${FAST_FLOAT_VERSION}/") }
335+
includeEmptyDirs = false
336+
into("$thirdPartyNdkDir/fast_float")
337+
}
338+
315339
val downloadFmt by
316340
tasks.creating(Download::class) {
317341
dependsOn(createNativeDepsDirectories)
@@ -549,6 +573,7 @@ android {
549573
"generateCodegenArtifactsFromSchema",
550574
prepareBoost,
551575
prepareDoubleConversion,
576+
prepareFastFloat,
552577
prepareFmt,
553578
prepareFolly,
554579
prepareGlog,

packages/react-native/ReactAndroid/src/main/jni/third-party/folly/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,8 @@ SET(folly_FLAGS
2626
SET(folly_runtime_SRC
2727
folly/Conv.cpp
2828
folly/Demangle.cpp
29-
folly/dynamic.cpp
3029
folly/FileUtil.cpp
3130
folly/Format.cpp
32-
folly/json_pointer.cpp
33-
folly/json.cpp
3431
folly/ScopeGuard.cpp
3532
folly/SharedMutex.cpp
3633
folly/String.cpp
@@ -42,6 +39,9 @@ SET(folly_runtime_SRC
4239
folly/detail/SplitStringSimd.cpp
4340
folly/detail/UniqueInstance.cpp
4441
folly/hash/SpookyHashV2.cpp
42+
folly/json/dynamic.cpp
43+
folly/json/json_pointer.cpp
44+
folly/json/json.cpp
4545
folly/lang/CString.cpp
4646
folly/lang/SafeAssert.cpp
4747
folly/lang/ToAscii.cpp

packages/react-native/ReactCommon/React-Fabric.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ folly_version = folly_config[:version]
2222
folly_dep_name = folly_config[:dep_name]
2323

2424
boost_config = get_boost_config()
25-
boost_compiler_flags = boost_config[:compiler_flags]
25+
boost_compiler_flags = boost_config[:compiler_flags]
2626
react_native_path = ".."
2727

2828
Pod::Spec.new do |s|
@@ -54,6 +54,7 @@ Pod::Spec.new do |s|
5454
s.dependency "React-logger"
5555
s.dependency "glog"
5656
s.dependency "DoubleConversion"
57+
s.dependency "fast_float", "6.1.4"
5758
s.dependency "fmt", "9.1.0"
5859
s.dependency "React-Core"
5960
s.dependency "React-debug"

packages/react-native/ReactCommon/React-FabricComponents.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ folly_version = folly_config[:version]
2222
folly_dep_name = folly_config[:dep_name]
2323

2424
boost_config = get_boost_config()
25-
boost_compiler_flags = boost_config[:compiler_flags]
25+
boost_compiler_flags = boost_config[:compiler_flags]
2626
react_native_path = ".."
2727

2828
Pod::Spec.new do |s|
@@ -34,6 +34,7 @@ Pod::Spec.new do |s|
3434
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
3535
"\"$(PODS_TARGET_SRCROOT)\"",
3636
"\"$(PODS_ROOT)/DoubleConversion\"",
37+
"\"$(PODS_ROOT)/fast_float/include\"",
3738
"\"$(PODS_ROOT)/fmt/include\"",
3839
]
3940

@@ -75,6 +76,7 @@ Pod::Spec.new do |s|
7576
s.dependency "React-logger"
7677
s.dependency "glog"
7778
s.dependency "DoubleConversion"
79+
s.dependency "fast_float", "6.1.4"
7880
s.dependency "fmt", "9.1.0"
7981
s.dependency "React-Core"
8082
s.dependency "React-debug"

0 commit comments

Comments
 (0)