mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Unify folly_version and compiler_flags in a single function (#42153)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42153 This non functional change unifies Folly version and compiler flag in a single function, so that it would be easier to update it in the future. ## Changelog: [Internal] - Unify folly version and compiler flags Reviewed By: cortinico Differential Revision: D52564771 fbshipit-source-id: 9b4b50560ddee05ce50465b6854666572148cb25
This commit is contained in:
committed by
Facebook GitHub Bot
parent
de0c43ead4
commit
a8aa96c8af
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
+3
-2
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
socket_rocket_version = '0.7.0'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
socket_rocket_version = '0.7.0'
|
||||
|
||||
header_search_paths = [
|
||||
|
||||
@@ -16,9 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1'
|
||||
folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
header_search_paths = [
|
||||
@@ -58,7 +58,7 @@ Pod::Spec.new do |s|
|
||||
s.framework = ["JavaScriptCore", "MobileCoreServices"]
|
||||
s.pod_target_xcconfig = {
|
||||
"HEADER_SEARCH_PATHS" => header_search_paths,
|
||||
"OTHER_CFLAGS" => "$(inherited) " + folly_flags,
|
||||
"OTHER_CFLAGS" => "$(inherited) " + folly_compiler_flags,
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20"
|
||||
}.merge!(ENV['USE_FRAMEWORKS'] != nil ? {
|
||||
"PUBLIC_HEADERS_FOLDER_PATH" => "#{module_name}.framework/Headers/#{header_dir}"
|
||||
|
||||
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
folly_dep_name = 'RCT-Folly/Fabric'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
react_native_path = ".."
|
||||
|
||||
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
folly_dep_name = 'RCT-Folly/Fabric'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
react_native_path = ".."
|
||||
|
||||
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
using_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1"
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -17,8 +17,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -17,8 +17,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
folly_dep_name = 'RCT-Folly/Fabric'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
react_native_path = ".."
|
||||
|
||||
@@ -20,8 +20,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-jsinspector"
|
||||
|
||||
@@ -17,8 +17,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
+4
-2
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
using_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1"
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
+4
-2
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
using_hermes = ENV['USE_HERMES'] == nil || ENV['USE_HERMES'] == "1"
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
+3
-2
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,10 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
folly_dep_name = 'RCT-Folly/Fabric'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
folly_dep_name = 'RCT-Folly/Fabric'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
|
||||
+3
-2
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
folly_dep_name = 'RCT-Folly/Fabric'
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
header_search_paths = [
|
||||
"\"$(PODS_ROOT)/RCT-Folly\"",
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
boost_compiler_flags = '-Wno-documentation'
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
require "test/unit"
|
||||
require_relative "../codegen.rb"
|
||||
require_relative "../helpers.rb"
|
||||
require_relative "./test_utils/PodMock.rb"
|
||||
require_relative "./test_utils/PathnameMock.rb"
|
||||
require_relative "./test_utils/FileMock.rb"
|
||||
@@ -59,7 +60,7 @@ class CodegenTests < Test::Unit::TestCase
|
||||
:codegen_output_dir=>"build/generated/ios",
|
||||
:config_file_dir=>"",
|
||||
:fabric_enabled=>false,
|
||||
:folly_version=>"2024.01.01.00",
|
||||
:folly_version=>Helpers::Constants.folly_config()[:version],
|
||||
:react_native_path=>"../node_modules/react-native"
|
||||
}])
|
||||
assert_equal(codegen_utils_mock.get_react_codegen_spec_params, [])
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
require "test/unit"
|
||||
require "json"
|
||||
require_relative "../codegen_utils.rb"
|
||||
require_relative "../helpers.rb"
|
||||
require_relative "./test_utils/FileMock.rb"
|
||||
require_relative "./test_utils/DirMock.rb"
|
||||
require_relative "./test_utils/PodMock.rb"
|
||||
@@ -363,7 +364,7 @@ class CodegenUtilsTests < Test::Unit::TestCase
|
||||
:react_native_path => "../node_modules/react-native"}
|
||||
])
|
||||
assert_equal(codegen_utils_mock.get_react_codegen_spec_params, [{
|
||||
:folly_version=>"2024.01.01.00",
|
||||
:folly_version=>Helpers::Constants.folly_config()[:version],
|
||||
:package_json_file => "#{app_path}/ios/../node_modules/react-native/package.json",
|
||||
:script_phases => "echo TestScript"
|
||||
}])
|
||||
|
||||
@@ -4,12 +4,17 @@
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require "test/unit"
|
||||
require_relative "../helpers.rb"
|
||||
require_relative "../new_architecture.rb"
|
||||
require_relative "./test_utils/InstallerMock.rb"
|
||||
require_relative "./test_utils/PodMock.rb"
|
||||
require_relative "./test_utils/SpecMock.rb"
|
||||
require_relative "./test_utils/FileMock.rb"
|
||||
|
||||
def get_folly_config()
|
||||
return Helpers::Constants.folly_config
|
||||
end
|
||||
|
||||
## Monkey patching to reset properly static props of the Helper.
|
||||
class NewArchitectureHelper
|
||||
def self.reset
|
||||
@@ -112,15 +117,18 @@ class NewArchitectureTests < Test::Unit::TestCase
|
||||
NewArchitectureHelper.modify_flags_for_new_architecture(installer, true)
|
||||
|
||||
# Assert
|
||||
assert_equal(first_xcconfig.attributes["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1")
|
||||
folly_config = Helpers::Constants.folly_config
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
|
||||
assert_equal(first_xcconfig.attributes["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 "+ folly_compiler_flags)
|
||||
assert_nil(first_xcconfig.attributes["OTHER_CFLAGS"])
|
||||
assert_equal(first_xcconfig.save_as_invocation, ["a/path/First.xcconfig"])
|
||||
assert_equal(second_xcconfig.attributes["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1")
|
||||
assert_equal(second_xcconfig.attributes["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 "+ folly_compiler_flags)
|
||||
assert_nil(second_xcconfig.attributes["OTHER_CFLAGS"])
|
||||
assert_equal(second_xcconfig.save_as_invocation, ["a/path/Second.xcconfig"])
|
||||
assert_equal(react_core_debug_config.build_settings["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1")
|
||||
assert_equal(react_core_debug_config.build_settings["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 "+ folly_compiler_flags)
|
||||
assert_nil(react_core_debug_config.build_settings["OTHER_CFLAGS"])
|
||||
assert_equal(react_core_release_config.build_settings["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1")
|
||||
assert_equal(react_core_release_config.build_settings["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 "+ folly_compiler_flags)
|
||||
assert_nil(react_core_release_config.build_settings["OTHER_CFLAGS"])
|
||||
assert_equal(yoga_debug_config.build_settings["OTHER_CPLUSPLUSFLAGS"], "$(inherited)")
|
||||
assert_nil(yoga_debug_config.build_settings["OTHER_CFLAGS"])
|
||||
@@ -139,10 +147,13 @@ class NewArchitectureTests < Test::Unit::TestCase
|
||||
NewArchitectureHelper.install_modules_dependencies(spec, true, '2024.01.01.00')
|
||||
|
||||
# Assert
|
||||
folly_config = Helpers::Constants.folly_config
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
|
||||
assert_equal(spec.compiler_flags, NewArchitectureHelper.folly_compiler_flags)
|
||||
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-rendererdebug/React_rendererdebug.framework/Headers\"")
|
||||
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++20")
|
||||
assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1")
|
||||
assert_equal(spec.pod_target_xcconfig["OTHER_CPLUSPLUSFLAGS"], "$(inherited) -DRCT_NEW_ARCH_ENABLED=1 "+ folly_compiler_flags)
|
||||
assert_equal(
|
||||
spec.dependencies,
|
||||
[
|
||||
@@ -171,7 +182,7 @@ class NewArchitectureTests < Test::Unit::TestCase
|
||||
def test_installModulesDependencies_whenNewArchDisabledAndSearchPathsAndCompilerFlagsArePresent_itInstallDependenciesAndPreserveOtherSettings
|
||||
# Arrange
|
||||
spec = SpecMock.new
|
||||
spec.compiler_flags = '-Wno-nullability-completeness'
|
||||
spec.compiler_flags = ''
|
||||
other_flags = "\"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/boost\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
|
||||
spec.pod_target_xcconfig = {
|
||||
"HEADER_SEARCH_PATHS" => other_flags
|
||||
@@ -181,7 +192,7 @@ class NewArchitectureTests < Test::Unit::TestCase
|
||||
NewArchitectureHelper.install_modules_dependencies(spec, false, '2024.01.01.00')
|
||||
|
||||
# Assert
|
||||
assert_equal(spec.compiler_flags, "-Wno-nullability-completeness #{NewArchitectureHelper.folly_compiler_flags}")
|
||||
assert_equal(Helpers::Constants.folly_config[:compiler_flags], "#{NewArchitectureHelper.folly_compiler_flags}")
|
||||
assert_equal(spec.pod_target_xcconfig["HEADER_SEARCH_PATHS"], "#{other_flags} \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/Yoga\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricImage/React_FabricImage.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-RCTFabric/RCTFabric.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-utils/React_utils.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-debug/React_debug.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-ImageManager/React_ImageManager.framework/Headers\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-rendererdebug/React_rendererdebug.framework/Headers\"")
|
||||
assert_equal(spec.pod_target_xcconfig["CLANG_CXX_LANGUAGE_STANDARD"], "c++20")
|
||||
assert_equal(
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require_relative '../../helpers.rb'
|
||||
|
||||
class CodegenUtilsMock
|
||||
@js_spec_list
|
||||
@codegen_config
|
||||
@@ -65,7 +67,7 @@ class CodegenUtilsMock
|
||||
return @react_codegen_script_phases
|
||||
end
|
||||
|
||||
def get_react_codegen_spec(package_json_file, folly_version: '2024.01.01.00', hermes_enabled: true, script_phases: nil)
|
||||
def get_react_codegen_spec(package_json_file, folly_version: Helpers.Constants.folly_config()[:version], hermes_enabled: true, script_phases: nil)
|
||||
@get_react_codegen_spec_params.push({
|
||||
package_json_file: package_json_file,
|
||||
folly_version: folly_version,
|
||||
@@ -90,7 +92,7 @@ class CodegenUtilsMock
|
||||
config_file_dir: '',
|
||||
codegen_output_dir: 'build/generated/ios',
|
||||
config_key: 'codegenConfig',
|
||||
folly_version: "2024.01.01.00",
|
||||
folly_version: Helpers::Constants.folly_config()[:version],
|
||||
codegen_utils: CodegenUtilsMock.new()
|
||||
)
|
||||
@use_react_native_codegen_discovery_params.push({
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
require_relative './helpers.rb'
|
||||
|
||||
# It builds the codegen CLI if it is not present
|
||||
#
|
||||
# Parameters:
|
||||
@@ -30,7 +32,7 @@ def run_codegen!(
|
||||
codegen_output_dir: 'build/generated/ios',
|
||||
config_key: 'codegenConfig',
|
||||
package_json_file: '~/app/package.json',
|
||||
folly_version: '2024.01.01.00',
|
||||
folly_version: Helpers::Constants.folly_config()[:version],
|
||||
codegen_utils: CodegenUtils.new()
|
||||
)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class CodegenUtils
|
||||
# - hermes_enabled: whether hermes is enabled or not.
|
||||
# - script_phases: whether we want to add some build script phases or not.
|
||||
# - file_manager: a class that implements the `File` interface. Defaults to `File`, the Dependency can be injected for testing purposes.
|
||||
def get_react_codegen_spec(package_json_file, folly_version: '2024.01.01.00', hermes_enabled: true, script_phases: nil, file_manager: File)
|
||||
def get_react_codegen_spec(package_json_file, folly_version: get_folly_config()[:version], hermes_enabled: true, script_phases: nil, file_manager: File)
|
||||
package = JSON.parse(file_manager.read(package_json_file))
|
||||
version = package['version']
|
||||
new_arch_disabled = ENV['RCT_NEW_ARCH_ENABLED'] != "1"
|
||||
@@ -277,7 +277,7 @@ class CodegenUtils
|
||||
config_file_dir: '',
|
||||
codegen_output_dir: 'build/generated/ios',
|
||||
config_key: 'codegenConfig',
|
||||
folly_version: '2024.01.01.00',
|
||||
folly_version: get_folly_config()[:version],
|
||||
codegen_utils: CodegenUtils.new(),
|
||||
file_manager: File
|
||||
)
|
||||
|
||||
@@ -40,5 +40,12 @@ module Helpers
|
||||
def self.min_ios_version_supported
|
||||
return '13.4'
|
||||
end
|
||||
|
||||
def self.folly_config
|
||||
return {
|
||||
:version => '2024.01.01.00',
|
||||
:compiler_flags => '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,14 +5,11 @@
|
||||
|
||||
require 'json'
|
||||
|
||||
require_relative "./utils"
|
||||
|
||||
require_relative "./utils.rb"
|
||||
require_relative "./helpers.rb"
|
||||
\
|
||||
class NewArchitectureHelper
|
||||
@@shared_flags = "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1"
|
||||
|
||||
@@folly_compiler_flags = "#{@@shared_flags} -Wno-comma -Wno-shorten-64-to-32"
|
||||
|
||||
@@new_arch_cpp_flags = " -DRCT_NEW_ARCH_ENABLED=1 #{@@shared_flags}"
|
||||
@@new_arch_cpp_flags = " -DRCT_NEW_ARCH_ENABLED=1 #{Helpers::Constants.folly_config()[:compiler_flags]}"
|
||||
|
||||
@@cplusplus_version = "c++20"
|
||||
|
||||
@@ -70,9 +67,12 @@ class NewArchitectureHelper
|
||||
end
|
||||
end
|
||||
|
||||
def self.install_modules_dependencies(spec, new_arch_enabled, folly_version)
|
||||
def self.install_modules_dependencies(spec, new_arch_enabled, folly_version = get_folly_config()[:version])
|
||||
# Pod::Specification does not have getters so, we have to read
|
||||
# the existing values from a hash representation of the object.
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
|
||||
hash = spec.to_hash
|
||||
|
||||
compiler_flags = hash["compiler_flags"] ? hash["compiler_flags"] : ""
|
||||
@@ -98,7 +98,7 @@ class NewArchitectureHelper
|
||||
}
|
||||
end
|
||||
header_search_paths_string = header_search_paths.join(" ")
|
||||
spec.compiler_flags = compiler_flags.empty? ? @@folly_compiler_flags : "#{compiler_flags} #{@@folly_compiler_flags}"
|
||||
spec.compiler_flags = compiler_flags.empty? ? folly_compiler_flags : "#{compiler_flags} #{compiler_flags}"
|
||||
current_config["HEADER_SEARCH_PATHS"] = current_headers.empty? ?
|
||||
header_search_paths_string :
|
||||
"#{current_headers} #{header_search_paths_string}"
|
||||
@@ -106,7 +106,7 @@ class NewArchitectureHelper
|
||||
|
||||
|
||||
spec.dependency "React-Core"
|
||||
spec.dependency "RCT-Folly", '2024.01.01.00'
|
||||
spec.dependency "RCT-Folly", folly_version
|
||||
spec.dependency "glog"
|
||||
|
||||
if new_arch_enabled
|
||||
@@ -141,7 +141,8 @@ class NewArchitectureHelper
|
||||
end
|
||||
|
||||
def self.folly_compiler_flags
|
||||
return @@folly_compiler_flags
|
||||
folly_config = get_folly_config()
|
||||
return folly_config[:compiler_flags]
|
||||
end
|
||||
|
||||
def self.extract_react_native_version(react_native_path, file_manager: File, json_parser: JSON)
|
||||
|
||||
@@ -20,7 +20,6 @@ require_relative './cocoapods/helpers.rb'
|
||||
$CODEGEN_OUTPUT_DIR = 'build/generated/ios'
|
||||
$CODEGEN_COMPONENT_DIR = 'react/renderer/components'
|
||||
$CODEGEN_MODULE_DIR = '.'
|
||||
$FOLLY_VERSION = '2024.01.01.00'
|
||||
|
||||
$START_TIME = Time.now.to_i
|
||||
|
||||
@@ -158,6 +157,7 @@ def use_react_native! (
|
||||
pod 'fmt', :podspec => "#{prefix}/third-party-podspecs/fmt.podspec"
|
||||
pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true
|
||||
|
||||
folly_config = get_folly_config()
|
||||
run_codegen!(
|
||||
app_path,
|
||||
config_file_dir,
|
||||
@@ -168,7 +168,7 @@ def use_react_native! (
|
||||
:hermes_enabled => hermes_enabled,
|
||||
:codegen_output_dir => $CODEGEN_OUTPUT_DIR,
|
||||
:package_json_file => File.join(__dir__, "..", "package.json"),
|
||||
:folly_version => $FOLLY_VERSION
|
||||
:folly_version => folly_config[:version]
|
||||
)
|
||||
|
||||
pod 'React-Codegen', :path => $CODEGEN_OUTPUT_DIR, :modular_headers => true
|
||||
@@ -238,7 +238,8 @@ end
|
||||
# - spec: The spec that has to be configured with the New Architecture code
|
||||
# - new_arch_enabled: Whether the module should install dependencies for the new architecture
|
||||
def install_modules_dependencies(spec, new_arch_enabled: NewArchitectureHelper.new_arch_enabled)
|
||||
NewArchitectureHelper.install_modules_dependencies(spec, new_arch_enabled, $FOLLY_VERSION)
|
||||
folly_config = get_folly_config()
|
||||
NewArchitectureHelper.install_modules_dependencies(spec, new_arch_enabled, folly_config[:version])
|
||||
end
|
||||
|
||||
# It returns the default flags.
|
||||
@@ -249,6 +250,15 @@ def get_default_flags()
|
||||
return ReactNativePodsUtils.get_default_flags()
|
||||
end
|
||||
|
||||
# This method returns an hash with the folly version and the folli compiler flags
|
||||
# that can be used to configure libraries.
|
||||
# In this way, we can update those values in react native, and all the libraries will benefit
|
||||
# from it.
|
||||
# @return an hash with the `:version` and `:compiler_flags` fields.
|
||||
def get_folly_config()
|
||||
return Helpers::Constants.folly_config
|
||||
end
|
||||
|
||||
# Function that executes after React Native has been installed to configure some flags and build settings.
|
||||
#
|
||||
# Parameters
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
folly_release_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_release_version = folly_config[:version]
|
||||
|
||||
Pod::Spec.new do |spec|
|
||||
spec.name = 'RCT-Folly'
|
||||
@@ -21,7 +23,7 @@ Pod::Spec.new do |spec|
|
||||
spec.dependency 'DoubleConversion'
|
||||
spec.dependency 'glog'
|
||||
spec.dependency "fmt", "9.1.0"
|
||||
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_PTHREAD=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation -faligned-new'
|
||||
spec.compiler_flags = folly_compiler_flags + ' -DFOLLY_HAVE_PTHREAD=1 -Wno-documentation -faligned-new'
|
||||
spec.source_files = 'folly/String.cpp',
|
||||
'folly/Conv.cpp',
|
||||
'folly/Demangle.cpp',
|
||||
|
||||
@@ -14,6 +14,7 @@ PODS:
|
||||
- hermes-engine/inspector_chrome (1000.0.0)
|
||||
- hermes-engine/Public (1000.0.0)
|
||||
- MyNativeView (0.0.1):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
- RCT-Folly (= 2024.01.01.00)
|
||||
@@ -33,6 +34,7 @@ PODS:
|
||||
- ReactCommon/turbomodule/core
|
||||
- Yoga
|
||||
- NativeCxxModuleExample (0.0.1):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
- RCT-Folly (= 2024.01.01.00)
|
||||
@@ -946,6 +948,7 @@ PODS:
|
||||
- React-perflogger (= 1000.0.0)
|
||||
- React-jsinspector (1000.0.0):
|
||||
- glog
|
||||
- RCT-Folly (= 2024.01.01.00)
|
||||
- React-nativeconfig
|
||||
- React-jsitracing (1000.0.0):
|
||||
- React-jsi
|
||||
@@ -986,6 +989,7 @@ PODS:
|
||||
- React-Fabric
|
||||
- React-graphics
|
||||
- React-hermes
|
||||
- React-jsinspector
|
||||
- React-nativeconfig
|
||||
- React-NativeModulesApple
|
||||
- React-RCTFabric
|
||||
@@ -1190,6 +1194,7 @@ PODS:
|
||||
- React-logger (= 1000.0.0)
|
||||
- React-perflogger (= 1000.0.0)
|
||||
- ScreenshotManager (0.0.1):
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- hermes-engine
|
||||
- RCT-Folly (= 2024.01.01.00)
|
||||
@@ -1407,62 +1412,62 @@ SPEC CHECKSUMS:
|
||||
FBLazyVector: f4492a543c5a8fa1502d3a5867e3f7252497cfe8
|
||||
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
|
||||
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
|
||||
hermes-engine: 2ba04c55f458b759ed05e05b4b7044a6ea39e332
|
||||
MyNativeView: 1ec1acd16067ac22bced65cf00a900a7926bd393
|
||||
NativeCxxModuleExample: f74b5dd25436f3a7f696c4b1be7e0d8da686cd72
|
||||
hermes-engine: 667c9880f3588d193d7013603c5d670aea50c307
|
||||
MyNativeView: 99b7fc82427fb4de5477b07eee451bb5995843db
|
||||
NativeCxxModuleExample: 7a2e045ad6fb1c8143187be22223e7d238913b52
|
||||
OCMock: 9491e4bec59e0b267d52a9184ff5605995e74be8
|
||||
RCT-Folly: 823c6f6ec910a75d4ad28898b4a11cdee140b92a
|
||||
RCT-Folly: 045d6ecaa59d826c5736dfba0b2f4083ff8d79df
|
||||
RCTDeprecation: 3808e36294137f9ee5668f4df2e73dc079cd1dcf
|
||||
RCTRequired: 82c56a03b3efd524bfdb581a906add903f78f978
|
||||
RCTTypeSafety: 5f57d4ae5dfafc85a0f575d756c909b584722c52
|
||||
React: cb6dc75e09f32aeddb4d8fb58a394a67219a92fe
|
||||
React-callinvoker: bae59cbd6affd712bbfc703839dad868ff35069d
|
||||
React-Codegen: feef8181325890b506018f693c1293f1aa627cea
|
||||
React-Core: 561b644397db48cf93bccb40184e968d40b75996
|
||||
React-CoreModules: ad1b7cb8efe5f3c7e88548b6ea6aad8507774471
|
||||
React-cxxreact: 04bf6a12caa850f5d2c7bd6d66dfecd4741989b5
|
||||
React-Core: e83a7e3595b2bdfd013f40563eee196b1801fc75
|
||||
React-CoreModules: 04058009e696161fd7a9f55b43e04819c41f12e3
|
||||
React-cxxreact: d7e2b4279e31dee6ec2af7fd8fdd42b1fd0e655c
|
||||
React-debug: 296b501a90c41f83961f58c6d96a01330d499da5
|
||||
React-Fabric: ee767af0ad7ec93e67a82cd702bdc3c24086d963
|
||||
React-FabricImage: ca726038a733ebc92724728dc3a1823cd60fc74f
|
||||
React-graphics: fe23f0be844a21d42642596183f8ce0e54861ecf
|
||||
React-hermes: f192759ffeb9714917e9c39850ac349d8ea982d8
|
||||
React-Fabric: 2a9b753ed7595c5357f3043fb57fa0055d2f4301
|
||||
React-FabricImage: da62cc5089fe6bdaa6ec0ab6ccca75c7d679065d
|
||||
React-graphics: da82f771ed590fffcfdad572f07ffde01937f11d
|
||||
React-hermes: 14e7007ebbfcc9f674c9c4f3ac768aa587b6da79
|
||||
React-ImageManager: 716592dcbe11a4960e1eb3d82adb264ee15b5f6d
|
||||
React-jserrorhandler: 79fb3a8860fb1ea22dc77765aac15775593d4f8f
|
||||
React-jsi: 81f4e5b414c992c16c02e22e975a45aeb2b166e4
|
||||
React-jsiexecutor: 1212e26a01ce4de7443123f0ce090ec1affb3220
|
||||
React-jsinspector: 990c9583811f8a5e9ef9911787f862e40beb5a37
|
||||
React-jserrorhandler: 13a0cce4e1e445d2ace089dc6122fb85411a11b3
|
||||
React-jsi: b7645527d3f77afdea4365488e47dbc5b293177f
|
||||
React-jsiexecutor: 6baaff1e509ce9269b0457d3a9e442e3ae895c33
|
||||
React-jsinspector: 6b341ac3b45ef18ad102cf3d2b44b4c6804e39a5
|
||||
React-jsitracing: dd08057dd5b74119cb406beb42028da85ed5b8a5
|
||||
React-logger: 8486d7a1d32b972414b1d34a93470ee2562c6ee2
|
||||
React-Mapbuffer: fd0d0306c1c4326be5f18a61e978d32a66b20a85
|
||||
React-nativeconfig: 40a2c848083ef4065c163c854e1c82b5f9e9db84
|
||||
React-NativeModulesApple: fba3f5302c67e68463b52d90d4d9f869ff3ba1a1
|
||||
React-NativeModulesApple: 67ee4e22f916aceaa8ccfc9c849d3e7de5d55b0b
|
||||
React-perflogger: 70d009f755dd10002183454cdf5ad9b22de4a1d7
|
||||
React-RCTActionSheet: 943bd5f540f3af1e5a149c13c4de81858edf718a
|
||||
React-RCTAnimation: 750184a8efe97073d15215f6465d96cbb3d3b5ba
|
||||
React-RCTAppDelegate: 5dbbcec464358484334ed60b68e248e7694fa609
|
||||
React-RCTBlob: 20a233b87b0748b5ec5fd52cb6e1668e651ed775
|
||||
React-RCTFabric: d6c5afadce666f80006708c09d3d09dc7ab27240
|
||||
React-RCTImage: 16f53775b5d50cbd060f758fc2fcff0934e5eead
|
||||
React-RCTAnimation: 07583f0ebfa7154f0e696a75c32a8f8b180fc8c5
|
||||
React-RCTAppDelegate: 91aa093765f1ce5b782b4f0257679144552a2873
|
||||
React-RCTBlob: da87f794f188db6539a05b8e13cbc5a198c94848
|
||||
React-RCTFabric: d28cb914dbf28c6316d5863d8e6e11ab66704d8f
|
||||
React-RCTImage: 8f46d82257827c2332bc4108fddef1a840f440a7
|
||||
React-RCTLinking: efa67827466e50e07c5471447c12e474cbc5e336
|
||||
React-RCTNetwork: ce2bd048cbdf9101ec255d486310709f19600e79
|
||||
React-RCTNetwork: a80529d2d90f79caa5e31d49e840735a10d6d91a
|
||||
React-RCTPushNotification: c34ef3969207da3ddc777f36a252f99754b89e2d
|
||||
React-RCTSettings: d6f1d3ff1880f64b8664a35b3cce2e21d0db9859
|
||||
React-RCTTest: b4eefa65f8440c9de3ce8959407cad3f0698c935
|
||||
React-RCTSettings: 39ca10f68da0ec88a63c33152d43c222c8c38119
|
||||
React-RCTTest: 3b9f62c66c3814ccace402441597160aefc9e812
|
||||
React-RCTText: d9925903524a7b179cf7803162a98038e0bfb4fd
|
||||
React-RCTVibration: 14322c13fb0c5cc2884b714b11d277dc7fc326c4
|
||||
React-rendererdebug: 2e58409db231638bc3e78143d8844066a3302939
|
||||
React-RCTVibration: 33bef249bc4a637ed91bf1cf0d94d9329381dc7b
|
||||
React-rendererdebug: 0abbd75e947eeae23542f3bf7491b048ae063141
|
||||
React-rncore: e903b3d2819a25674403c548ec103f34bf02ba2b
|
||||
React-RuntimeApple: baf78bbf17710a844bbf6bbdf85605979ce097dc
|
||||
React-RuntimeCore: 35e84b0f8774ec5987a39802e59b538c15fdea9e
|
||||
React-RuntimeApple: 9375c19d597468266fcadc7303802f65f7d04d62
|
||||
React-RuntimeCore: b33a9d9ac5369ceee984fb394199d2c585b06dbb
|
||||
React-runtimeexecutor: e1c32bc249dd3cf3919cb4664fd8dc84ef70cff7
|
||||
React-RuntimeHermes: cc42f8965d813cdc8fdaae5009f6e2011fce9b15
|
||||
React-runtimescheduler: 6529d155a98010b6e8f0a3a86d4184b89a886633
|
||||
React-utils: 87ed8c079c9991831112fe716f2686c430699fc3
|
||||
ReactCommon: 4511ea0e8f349de031de7cad88c2ecf871ab69f9
|
||||
ReactCommon-Samples: cfc3383af93a741319e038977c2ae1082e4ff49e
|
||||
ScreenshotManager: d9c4ee0cfd08bf51f3d8eb0e53d6dc25846331f2
|
||||
React-RuntimeHermes: fed4ff3aae566b44ae4de1ee91dd79d7f4072079
|
||||
React-runtimescheduler: 579048828d226c68a09023bef54bbacfaea3f39c
|
||||
React-utils: d468de964db1cfd301b450755ba00518777704c4
|
||||
ReactCommon: bedbebd4c7b921d4cf54c528f1d6c3e30f889c6b
|
||||
ReactCommon-Samples: ca3ac1e08ee7f73d2b3b4a77946cfb44204d09ca
|
||||
ScreenshotManager: d7a27367ef857a6d813c4f40abd46b0bff2eef68
|
||||
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
|
||||
Yoga: ba060e7ec094e57aa646d6413e40608303556227
|
||||
Yoga: 463cb8e64f3b4cc13ec8d8ab56d892fff75baf5d
|
||||
|
||||
PODFILE CHECKSUM: 5afcf37691103b83159fb73be088b7cadc67af7b
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@ else
|
||||
source[:tag] = "v#{version}"
|
||||
end
|
||||
|
||||
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_CFG_NO_COROUTINES=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -Wno-comma -Wno-shorten-64-to-32'
|
||||
folly_version = '2024.01.01.00'
|
||||
folly_config = get_folly_config()
|
||||
folly_compiler_flags = folly_config[:compiler_flags]
|
||||
folly_version = folly_config[:version]
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "React-RCTTest"
|
||||
|
||||
Reference in New Issue
Block a user