diff --git a/Libraries/Blob/React-RCTBlob.podspec b/Libraries/Blob/React-RCTBlob.podspec index abd064d9afd..3d987644290 100644 --- a/Libraries/Blob/React-RCTBlob.podspec +++ b/Libraries/Blob/React-RCTBlob.podspec @@ -35,10 +35,10 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "FBReactNativeSpec", version s.dependency "ReactCommon/turbomodule/core", version s.dependency "React-jsi", version diff --git a/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec b/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec index 202ca894070..bd2a78e45cc 100644 --- a/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec +++ b/Libraries/FBReactNativeSpec/FBReactNativeSpec.podspec @@ -35,10 +35,10 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/FBReactNativeSpec\" \"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/FBReactNativeSpec\" \"$(PODS_ROOT)/RCT-Folly\"" } - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "RCTRequired", version s.dependency "RCTTypeSafety", version s.dependency "React-Core", version diff --git a/Libraries/Image/React-RCTImage.podspec b/Libraries/Image/React-RCTImage.podspec index b02829755d4..d0de0bd722e 100644 --- a/Libraries/Image/React-RCTImage.podspec +++ b/Libraries/Image/React-RCTImage.podspec @@ -36,10 +36,10 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "FBReactNativeSpec", version s.dependency "RCTTypeSafety", version s.dependency "ReactCommon/turbomodule/core", version diff --git a/Libraries/LinkingIOS/React-RCTLinking.podspec b/Libraries/LinkingIOS/React-RCTLinking.podspec index e724ee37662..5f07abebc67 100644 --- a/Libraries/LinkingIOS/React-RCTLinking.podspec +++ b/Libraries/LinkingIOS/React-RCTLinking.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } s.dependency "FBReactNativeSpec", version diff --git a/Libraries/NativeAnimation/React-RCTAnimation.podspec b/Libraries/NativeAnimation/React-RCTAnimation.podspec index aa6657db856..01f605c9822 100644 --- a/Libraries/NativeAnimation/React-RCTAnimation.podspec +++ b/Libraries/NativeAnimation/React-RCTAnimation.podspec @@ -35,10 +35,10 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "RCTTypeSafety", version s.dependency "ReactCommon/turbomodule/core", version s.dependency "React-jsi", version diff --git a/Libraries/Network/React-RCTNetwork.podspec b/Libraries/Network/React-RCTNetwork.podspec index 28fd6f386e5..e21afd21a30 100644 --- a/Libraries/Network/React-RCTNetwork.podspec +++ b/Libraries/Network/React-RCTNetwork.podspec @@ -35,11 +35,11 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } s.frameworks = "MobileCoreServices" - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "FBReactNativeSpec", version s.dependency "RCTTypeSafety", version s.dependency "ReactCommon/turbomodule/core", version diff --git a/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec b/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec index b4faefc8603..a2c915316eb 100644 --- a/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +++ b/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } s.framework = "UserNotifications" diff --git a/Libraries/Settings/React-RCTSettings.podspec b/Libraries/Settings/React-RCTSettings.podspec index 26fe6d6fcfa..45c92ba557b 100644 --- a/Libraries/Settings/React-RCTSettings.podspec +++ b/Libraries/Settings/React-RCTSettings.podspec @@ -36,10 +36,10 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "FBReactNativeSpec", version s.dependency "RCTTypeSafety", version s.dependency "ReactCommon/turbomodule/core", version diff --git a/Libraries/TypeSafety/RCTTypeSafety.podspec b/Libraries/TypeSafety/RCTTypeSafety.podspec index 90869877abd..1dd04a8c29a 100644 --- a/Libraries/TypeSafety/RCTTypeSafety.podspec +++ b/Libraries/TypeSafety/RCTTypeSafety.podspec @@ -34,11 +34,11 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/TypeSafety\" \"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/Libraries/TypeSafety\" \"$(PODS_ROOT)/RCT-Folly\"" } s.dependency "FBLazyVector", version - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "RCTRequired", version s.dependency "React-Core", version end diff --git a/Libraries/Vibration/React-RCTVibration.podspec b/Libraries/Vibration/React-RCTVibration.podspec index 1712e073262..c08abe6407c 100644 --- a/Libraries/Vibration/React-RCTVibration.podspec +++ b/Libraries/Vibration/React-RCTVibration.podspec @@ -36,11 +36,11 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } s.frameworks = "AudioToolbox" - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "FBReactNativeSpec", version s.dependency "ReactCommon/turbomodule/core", version s.dependency "React-jsi", version diff --git a/React-Core.podspec b/React-Core.podspec index 62529fb9fce..7a004607739 100644 --- a/React-Core.podspec +++ b/React-Core.podspec @@ -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)/Folly\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\"" } s.user_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/React-Core\""} s.default_subspec = "Default" @@ -69,6 +69,17 @@ Pod::Spec.new do |s| ss.private_header_files = "React/Cxx*/*.h" end + s.subspec "Hermes" do |ss| + ss.platforms = { :osx => "10.14" } + ss.source_files = "ReactCommon/hermes/executor/*.{cpp,h}", + "ReactCommon/hermes/inspector/*.{cpp,h}", + "ReactCommon/hermes/inspector/chrome/*.{cpp,h}", + "ReactCommon/hermes/inspector/detail/*.{cpp,h}" + ss.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1" } + ss.dependency "RCT-Folly/Futures" + ss.dependency "hermes", "~> 0.6.0" + end + s.subspec "DevSupport" do |ss| ss.source_files = "React/DevSupport/*.{h,mm,m}", "React/Inspector/*.{h,mm,m}" @@ -92,7 +103,7 @@ Pod::Spec.new do |s| end end - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "React-cxxreact", version s.dependency "React-perflogger", version s.dependency "React-jsi", version diff --git a/React/CoreModules/React-CoreModules.podspec b/React/CoreModules/React-CoreModules.podspec index 9aaccc1c41a..7d5a617b28a 100644 --- a/React/CoreModules/React-CoreModules.podspec +++ b/React/CoreModules/React-CoreModules.podspec @@ -34,11 +34,11 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\" \"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/React/CoreModules\" \"$(PODS_ROOT)/RCT-Folly\"" } s.dependency "FBReactNativeSpec", version - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "RCTTypeSafety", version s.dependency "React-Core/CoreModulesHeaders", version s.dependency "React-RCTImage", version diff --git a/React/CxxBridge/JSCExecutorFactory.mm b/React/CxxBridge/JSCExecutorFactory.mm index d93a28077bb..104375b1f69 100644 --- a/React/CxxBridge/JSCExecutorFactory.mm +++ b/React/CxxBridge/JSCExecutorFactory.mm @@ -7,7 +7,6 @@ #include "JSCExecutorFactory.h" -#import #import #import @@ -19,25 +18,8 @@ std::unique_ptr JSCExecutorFactory::createJSExecutor( std::shared_ptr delegate, std::shared_ptr __unused jsQueue) { - auto installBindings = [runtimeInstaller = runtimeInstaller_](jsi::Runtime &runtime) { - react::Logger iosLoggingBinder = [](const std::string &message, unsigned int logLevel) { - _RCTLogJavaScriptInternal(static_cast(logLevel), [NSString stringWithUTF8String:message.c_str()]); - }; - react::bindNativeLogger(runtime, iosLoggingBinder); - - react::PerformanceNow iosPerformanceNowBinder = []() { - // CACurrentMediaTime() returns the current absolute time, in seconds - return CACurrentMediaTime() * 1000; - }; - react::bindNativePerformanceNow(runtime, iosPerformanceNowBinder); - - // Wrap over the original runtimeInstaller - if (runtimeInstaller) { - runtimeInstaller(runtime); - } - }; return std::make_unique( - facebook::jsc::makeJSCRuntime(), delegate, JSIExecutor::defaultTimeoutInvoker, std::move(installBindings)); + facebook::jsc::makeJSCRuntime(), delegate, JSIExecutor::defaultTimeoutInvoker, runtimeInstaller_); } } // namespace react diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index b0436b06cf6..171005a4f02 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -37,7 +37,16 @@ #import #import +#if TARGET_OS_OSX && __has_include() +#define RCT_USE_HERMES 1 +#endif +#if RCT_USE_HERMES +#import "HermesExecutorFactory.h" +#else #import "JSCExecutorFactory.h" +#endif +#import "RCTJSIExecutorRuntimeInstaller.h" + #import "NSDataBigString.h" #import "RCTMessageThread.h" #import "RCTObjcExecutor.h" @@ -370,7 +379,12 @@ struct RCTInstanceCallback : public InstanceCallback { executorFactory = [cxxDelegate jsExecutorFactoryForBridge:self]; } if (!executorFactory) { - executorFactory = std::make_shared(nullptr); + auto installBindings = RCTJSIExecutorRuntimeInstaller(nullptr); +#if RCT_USE_HERMES + executorFactory = std::make_shared(installBindings); +#else + executorFactory = std::make_shared(installBindings); +#endif } } else { id objcExecutor = [self moduleForClass:self.executorClass]; diff --git a/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h b/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h new file mode 100644 index 00000000000..9ec6bf958f7 --- /dev/null +++ b/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include + +namespace facebook { +namespace react { + +/** + * Creates a lambda used to bind a JSIRuntime in the context of + * Apple platforms, such as console logging, performance metrics, etc. + */ +JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller( + JSIExecutor::RuntimeInstaller runtimeInstallerToWrap); + +} // namespace react +} // namespace facebook diff --git a/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm b/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm new file mode 100644 index 00000000000..ae811e14cb0 --- /dev/null +++ b/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm @@ -0,0 +1,37 @@ +/* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#include "RCTJSIExecutorRuntimeInstaller.h" + +#import + +namespace facebook { +namespace react { + +JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller(JSIExecutor::RuntimeInstaller runtimeInstallerToWrap) +{ + return [runtimeInstaller = runtimeInstallerToWrap](jsi::Runtime &runtime) { + Logger iosLoggingBinder = [](const std::string &message, unsigned int logLevel) { + _RCTLogJavaScriptInternal(static_cast(logLevel), [NSString stringWithUTF8String:message.c_str()]); + }; + bindNativeLogger(runtime, iosLoggingBinder); + + PerformanceNow iosPerformanceNowBinder = []() { + // CACurrentMediaTime() returns the current absolute time, in seconds + return CACurrentMediaTime() * 1000; + }; + bindNativePerformanceNow(runtime, iosPerformanceNowBinder); + + // Wrap over the original runtimeInstaller + if (runtimeInstaller) { + runtimeInstaller(runtime); + } + }; +} + +} // namespace react +} // namespace facebook diff --git a/React/React-RCTFabric.podspec b/React/React-RCTFabric.podspec index 139a51e6940..34d1096c413 100644 --- a/React/React-RCTFabric.podspec +++ b/React/React-RCTFabric.podspec @@ -38,8 +38,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)/Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" } - s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/Folly\"", + 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\"", "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags } s.dependency "React-Core", version diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/Android.mk b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/Android.mk index d34b90af3ce..ff05e4c1482 100644 --- a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/Android.mk +++ b/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/Android.mk @@ -17,7 +17,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-no LOCAL_CPP_FEATURES := exceptions -LOCAL_STATIC_LIBRARIES := libjsireact libjsi +LOCAL_STATIC_LIBRARIES := libjsireact libjsi libhermes-executor-common-release LOCAL_SHARED_LIBRARIES := libfolly_json libfb libfbjni libreactnativejni libhermes include $(BUILD_SHARED_LIBRARY) @@ -34,7 +34,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-no LOCAL_CPP_FEATURES := exceptions -LOCAL_STATIC_LIBRARIES := libjsireact libjsi libhermes-inspector +LOCAL_STATIC_LIBRARIES := libjsireact libjsi libhermes-executor-common-debug libhermes-inspector LOCAL_SHARED_LIBRARIES := libfolly_json libfb libfbjni libreactnativejni libhermes include $(BUILD_SHARED_LIBRARY) diff --git a/ReactCommon/React-Fabric.podspec b/ReactCommon/React-Fabric.podspec index fb996004093..1937e45d71b 100644 --- a/ReactCommon/React-Fabric.podspec +++ b/ReactCommon/React-Fabric.podspec @@ -50,7 +50,7 @@ Pod::Spec.new do |s| ss.source_files = "fabric/attributedstring/**/*.{m,mm,cpp,h}" ss.exclude_files = "**/tests/*" ss.header_dir = "react/attributedstring" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "better" do |ss| @@ -59,7 +59,7 @@ Pod::Spec.new do |s| ss.source_files = "better/**/*.{m,mm,cpp,h}" ss.exclude_files = "**/tests/*" ss.header_dir = "better" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "config" do |ss| @@ -74,7 +74,7 @@ Pod::Spec.new do |s| ss.source_files = "fabric/core/**/*.{m,mm,cpp,h}" ss.exclude_files = "**/tests/**/*" ss.header_dir = "react/core" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "components" do |ss| @@ -84,7 +84,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/activityindicator/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/activityindicator" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "image" do |sss| @@ -93,7 +93,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/image/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/image" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "legacyviewmanagerinterop" do |sss| @@ -102,7 +102,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/legacyviewmanagerinterop/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/legacyviewmanagerinterop" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" } end ss.subspec "modal" do |sss| @@ -111,7 +111,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/modal/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/modal" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "rncore" do |sss| @@ -122,7 +122,7 @@ Pod::Spec.new do |s| # TODO: These should be re-enabled later when Codegen Native Module support is needed. "fabric/components/rncore/rncore-generated.mm", "fabric/components/rncore/NativeModules.{h,cpp}" sss.header_dir = "react/components/rncore" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "root" do |sss| @@ -131,7 +131,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/root/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/root" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "safeareaview" do |sss| @@ -140,7 +140,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/safeareaview/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/safeareaview" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "scrollview" do |sss| @@ -149,7 +149,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/scrollview/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/scrollview" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "slider" do |sss| @@ -159,7 +159,7 @@ Pod::Spec.new do |s| sss.exclude_files = "**/tests/*", "**/android/*" sss.header_dir = "react/components/slider" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "text" do |sss| @@ -168,7 +168,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/text/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/text" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "textinput" do |sss| @@ -177,7 +177,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/textinput/iostextinput/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/iostextinput" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "unimplementedview" do |sss| @@ -186,7 +186,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/unimplementedview/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/unimplementedview" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end ss.subspec "view" do |sss| @@ -196,7 +196,7 @@ Pod::Spec.new do |s| sss.source_files = "fabric/components/view/**/*.{m,mm,cpp,h}" sss.exclude_files = "**/tests/*" sss.header_dir = "react/components/view" - sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end end @@ -206,7 +206,7 @@ Pod::Spec.new do |s| ss.source_files = "fabric/debug/**/*.{m,mm,cpp,h}" ss.exclude_files = "**/tests/*" ss.header_dir = "react/debug" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "imagemanager" do |ss| @@ -218,7 +218,7 @@ Pod::Spec.new do |s| "**/android/*", "**/cxx/*" ss.header_dir = "react/imagemanager" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "mounting" do |ss| @@ -227,7 +227,7 @@ Pod::Spec.new do |s| ss.source_files = "fabric/mounting/**/*.{m,mm,cpp,h}" ss.exclude_files = "**/tests/*" ss.header_dir = "react/mounting" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "textlayoutmanager" do |ss| @@ -238,7 +238,7 @@ Pod::Spec.new do |s| "**/android/*", "**/cxx/*" ss.header_dir = "react/textlayoutmanager" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "uimanager" do |ss| @@ -247,12 +247,12 @@ Pod::Spec.new do |s| ss.source_files = "fabric/uimanager/**/*.{m,mm,cpp,h}" ss.exclude_files = "**/tests/*", ss.header_dir = "react/uimanager" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end s.subspec "utils" do |ss| ss.source_files = "utils/*.{m,mm,cpp,h}" ss.header_dir = "react/utils" - ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } end end diff --git a/ReactCommon/ReactCommon.podspec b/ReactCommon/ReactCommon.podspec index b8cd4043acc..bad800f338c 100644 --- a/ReactCommon/ReactCommon.podspec +++ b/ReactCommon/ReactCommon.podspec @@ -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)/Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"", + 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\"", "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" } @@ -42,7 +42,7 @@ Pod::Spec.new do |s| ss.dependency "React-Core", version ss.dependency "React-cxxreact", version ss.dependency "React-jsi", version - ss.dependency "Folly", folly_version + ss.dependency "RCT-Folly", folly_version ss.dependency "DoubleConversion" ss.dependency "glog" diff --git a/ReactCommon/cxxreact/Android.mk b/ReactCommon/cxxreact/Android.mk index d82b10b4e75..a5024364c60 100644 --- a/ReactCommon/cxxreact/Android.mk +++ b/ReactCommon/cxxreact/Android.mk @@ -33,3 +33,4 @@ $(call import-module,glog) $(call import-module,jsi) $(call import-module,jsinspector) $(call import-module,hermes/inspector) +$(call import-module,hermes/executor) diff --git a/ReactCommon/cxxreact/React-cxxreact.podspec b/ReactCommon/cxxreact/React-cxxreact.podspec index 34e8f0dca51..b31dfe6359f 100644 --- a/ReactCommon/cxxreact/React-cxxreact.podspec +++ b/ReactCommon/cxxreact/React-cxxreact.podspec @@ -33,12 +33,12 @@ 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)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.header_dir = "cxxreact" s.dependency "boost-for-react-native", "1.63.0" s.dependency "DoubleConversion" - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "glog" s.dependency "React-jsinspector", version s.dependency "React-callinvoker", version diff --git a/ReactCommon/hermes/executor/Android.mk b/ReactCommon/hermes/executor/Android.mk new file mode 100644 index 00000000000..491100c33a9 --- /dev/null +++ b/ReactCommon/hermes/executor/Android.mk @@ -0,0 +1,37 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +LOCAL_PATH := $(call my-dir) +REACT_NATIVE := $(LOCAL_PATH)/../../.. + +include $(REACT_NATIVE)/ReactCommon/common.mk +include $(CLEAR_VARS) + +LOCAL_MODULE := hermes-executor-common-release + +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) + +LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) + +LOCAL_STATIC_LIBRARIES := libjsi libjsireact +LOCAL_SHARED_LIBRARIES := libhermes + +include $(BUILD_SHARED_LIBRARY) + +include $(CLEAR_VARS) + +LOCAL_MODULE := hermes-executor-common-debug +LOCAL_CFLAGS := -DHERMES_ENABLE_DEBUGGER=1 + +LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp) + +LOCAL_C_INCLUDES := $(LOCAL_PATH) $(REACT_NATIVE)/ReactCommon/jsi $(call find-node-module,$(LOCAL_PATH),hermes-engine)/android/include +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) + +LOCAL_STATIC_LIBRARIES := libjsi libjsireact libhermes-inspector +LOCAL_SHARED_LIBRARIES := libhermes + +include $(BUILD_SHARED_LIBRARY) diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.cpp b/ReactCommon/hermes/executor/HermesExecutorFactory.cpp similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.cpp rename to ReactCommon/hermes/executor/HermesExecutorFactory.cpp diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.h b/ReactCommon/hermes/executor/HermesExecutorFactory.h similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/HermesExecutorFactory.h rename to ReactCommon/hermes/executor/HermesExecutorFactory.h diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/JSITracing.cpp b/ReactCommon/hermes/executor/JSITracing.cpp similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/JSITracing.cpp rename to ReactCommon/hermes/executor/JSITracing.cpp diff --git a/ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/JSITracing.h b/ReactCommon/hermes/executor/JSITracing.h similarity index 100% rename from ReactAndroid/src/main/java/com/facebook/hermes/reactexecutor/JSITracing.h rename to ReactCommon/hermes/executor/JSITracing.h diff --git a/ReactCommon/hermes/inspector/chrome/Connection.cpp b/ReactCommon/hermes/inspector/chrome/Connection.cpp index e8653e592c1..980f355c9f4 100644 --- a/ReactCommon/hermes/inspector/chrome/Connection.cpp +++ b/ReactCommon/hermes/inspector/chrome/Connection.cpp @@ -217,8 +217,8 @@ bool Connection::Impl::disconnect() { inspector_->disable().via(executor_.get()).thenValue([this](auto &&) { // HACK: We purposely call RemoteConnection::onDisconnect on a *different* - // rather than on this thread (the executor thread). This is to prevent this - // scenario: + // thread, rather than on this thread (the executor thread). This is to + // prevent this scenario: // // 1. RemoteConnection::onDisconnect runs on the executor thread // 2. onDisconnect through a long chain of calls causes the Connection diff --git a/ReactCommon/jsi/React-jsi.podspec b/ReactCommon/jsi/React-jsi.podspec index 5cec68c6857..01035d5667e 100644 --- a/ReactCommon/jsi/React-jsi.podspec +++ b/ReactCommon/jsi/React-jsi.podspec @@ -33,13 +33,13 @@ 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)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(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 "DoubleConversion" - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "glog" s.subspec "Default" do diff --git a/ReactCommon/jsiexecutor/React-jsiexecutor.podspec b/ReactCommon/jsiexecutor/React-jsiexecutor.podspec index 9da009177b6..f67143d1b0c 100644 --- a/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +++ b/ReactCommon/jsiexecutor/React-jsiexecutor.podspec @@ -31,13 +31,13 @@ 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)/Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } + s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\"" } s.header_dir = "jsireact" s.dependency "React-cxxreact", version s.dependency "React-jsi", version s.dependency "React-perflogger", version - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "DoubleConversion" s.dependency "glog" end diff --git a/ReactCommon/react/renderer/graphics/React-graphics.podspec b/ReactCommon/react/renderer/graphics/React-graphics.podspec index ddd519790e5..30bffb22f09 100644 --- a/ReactCommon/react/renderer/graphics/React-graphics.podspec +++ b/ReactCommon/react/renderer/graphics/React-graphics.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| "**/android/*", "**/cxx/*" s.header_dir = "react/graphics" - s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" } + s.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/RCT-Folly\"" } s.dependency "Folly/Fabric", folly_version end diff --git a/packages/rn-tester/Podfile.lock b/packages/rn-tester/Podfile.lock index 5986ce861e0..4aed3559d82 100644 --- a/packages/rn-tester/Podfile.lock +++ b/packages/rn-tester/Podfile.lock @@ -5,7 +5,7 @@ PODS: - DoubleConversion (1.1.6) - FBLazyVector (1000.0.0) - FBReactNativeSpec (1000.0.0): - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - RCTRequired (= 1000.0.0) - RCTTypeSafety (= 1000.0.0) - React-Core (= 1000.0.0) @@ -57,23 +57,23 @@ PODS: - FlipperKit/SKIOSNetworkPlugin (0.41.5): - FlipperKit/Core - FlipperKit/FlipperKitNetworkPlugin - - Folly (2020.01.13.00): - - boost-for-react-native - - DoubleConversion - - Folly/Default (= 2020.01.13.00) - - glog - - Folly/Default (2020.01.13.00): - - boost-for-react-native - - DoubleConversion - - glog - glog (0.3.5) - OpenSSL-Universal (1.0.2.19): - OpenSSL-Universal/Static (= 1.0.2.19) - OpenSSL-Universal/Static (1.0.2.19) + - RCT-Folly (2020.01.13.00): + - boost-for-react-native + - DoubleConversion + - glog + - RCT-Folly/Default (= 2020.01.13.00) + - RCT-Folly/Default (2020.01.13.00): + - boost-for-react-native + - DoubleConversion + - glog - RCTRequired (1000.0.0) - RCTTypeSafety (1000.0.0): - FBLazyVector (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - RCTRequired (= 1000.0.0) - React-Core (= 1000.0.0) - React (1000.0.0): @@ -91,8 +91,8 @@ PODS: - React-RCTVibration (= 1000.0.0) - React-callinvoker (1000.0.0) - React-Core (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default (= 1000.0.0) - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -100,8 +100,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/CoreModulesHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -109,16 +109,16 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/Default (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) - React-jsiexecutor (= 1000.0.0) - React-perflogger (= 1000.0.0) - Yoga - React-Core/DevSupport (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default (= 1000.0.0) - React-Core/RCTWebSocket (= 1000.0.0) - React-cxxreact (= 1000.0.0) @@ -128,8 +128,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTActionSheetHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -137,8 +137,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTAnimationHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -146,8 +146,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTBlobHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -155,8 +155,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTImageHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -164,8 +164,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTLinkingHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -173,8 +173,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTNetworkHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -182,8 +182,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTPushNotificationHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -191,8 +191,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTSettingsHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -200,8 +200,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTTextHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -209,8 +209,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTVibrationHeaders (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -218,8 +218,8 @@ PODS: - React-perflogger (= 1000.0.0) - Yoga - React-Core/RCTWebSocket (1000.0.0): - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-Core/Default (= 1000.0.0) - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -228,7 +228,7 @@ PODS: - Yoga - React-CoreModules (1000.0.0): - FBReactNativeSpec (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - RCTTypeSafety (= 1000.0.0) - React-Core/CoreModulesHeaders (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -237,8 +237,8 @@ PODS: - React-cxxreact (1000.0.0): - boost-for-react-native (= 1.63.0) - DoubleConversion - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-callinvoker (= 1000.0.0) - React-jsi (= 1000.0.0) - React-jsinspector (= 1000.0.0) @@ -247,18 +247,18 @@ PODS: - React-jsi (1000.0.0): - boost-for-react-native (= 1.63.0) - DoubleConversion - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-jsi/Default (= 1000.0.0) - React-jsi/Default (1000.0.0): - boost-for-react-native (= 1.63.0) - DoubleConversion - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-jsiexecutor (1000.0.0): - DoubleConversion - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-cxxreact (= 1000.0.0) - React-jsi (= 1000.0.0) - React-perflogger (= 1000.0.0) @@ -268,14 +268,14 @@ PODS: - React-Core/RCTActionSheetHeaders (= 1000.0.0) - React-RCTAnimation (1000.0.0): - FBReactNativeSpec (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - RCTTypeSafety (= 1000.0.0) - React-Core/RCTAnimationHeaders (= 1000.0.0) - React-jsi (= 1000.0.0) - ReactCommon/turbomodule/core (= 1000.0.0) - React-RCTBlob (1000.0.0): - FBReactNativeSpec (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - React-Core/RCTBlobHeaders (= 1000.0.0) - React-Core/RCTWebSocket (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -283,7 +283,7 @@ PODS: - ReactCommon/turbomodule/core (= 1000.0.0) - React-RCTImage (1000.0.0): - FBReactNativeSpec (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - RCTTypeSafety (= 1000.0.0) - React-Core/RCTImageHeaders (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -296,7 +296,7 @@ PODS: - ReactCommon/turbomodule/core (= 1000.0.0) - React-RCTNetwork (1000.0.0): - FBReactNativeSpec (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - RCTTypeSafety (= 1000.0.0) - React-Core/RCTNetworkHeaders (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -309,13 +309,13 @@ PODS: - ReactCommon/turbomodule/core (= 1000.0.0) - React-RCTSettings (1000.0.0): - FBReactNativeSpec (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - RCTTypeSafety (= 1000.0.0) - React-Core/RCTSettingsHeaders (= 1000.0.0) - React-jsi (= 1000.0.0) - ReactCommon/turbomodule/core (= 1000.0.0) - React-RCTTest (1000.0.0): - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - React-Core (= 1000.0.0) - React-CoreModules (= 1000.0.0) - React-jsi (= 1000.0.0) @@ -324,7 +324,7 @@ PODS: - React-Core/RCTTextHeaders (= 1000.0.0) - React-RCTVibration (1000.0.0): - FBReactNativeSpec (= 1000.0.0) - - Folly (= 2020.01.13.00) + - RCT-Folly (= 2020.01.13.00) - React-Core/RCTVibrationHeaders (= 1000.0.0) - React-jsi (= 1000.0.0) - ReactCommon/turbomodule/core (= 1000.0.0) @@ -332,8 +332,8 @@ PODS: - React-jsi (= 1000.0.0) - ReactCommon/turbomodule/core (1000.0.0): - DoubleConversion - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-callinvoker (= 1000.0.0) - React-Core (= 1000.0.0) - React-cxxreact (= 1000.0.0) @@ -341,8 +341,8 @@ PODS: - React-perflogger (= 1000.0.0) - ReactCommon/turbomodule/samples (1000.0.0): - DoubleConversion - - Folly (= 2020.01.13.00) - glog + - RCT-Folly (= 2020.01.13.00) - React-callinvoker (= 1000.0.0) - React-Core (= 1000.0.0) - React-cxxreact (= 1000.0.0) @@ -376,8 +376,8 @@ DEPENDENCIES: - FlipperKit/FlipperKitReactPlugin (~> 0.41.1) - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.41.1) - FlipperKit/SKIOSNetworkPlugin (~> 0.41.1) - - Folly (from `../../third-party-podspecs/Folly.podspec`) - glog (from `../../third-party-podspecs/glog.podspec`) + - RCT-Folly (from `../../third-party-podspecs/RCT-Folly.podspec`) - RCTRequired (from `../../Libraries/RCTRequired`) - RCTTypeSafety (from `../../Libraries/TypeSafety`) - React (from `../../`) @@ -429,10 +429,10 @@ EXTERNAL SOURCES: :path: "../../Libraries/FBLazyVector" FBReactNativeSpec: :path: "../../Libraries/FBReactNativeSpec" - Folly: - :podspec: "../../third-party-podspecs/Folly.podspec" glog: :podspec: "../../third-party-podspecs/glog.podspec" + RCT-Folly: + :podspec: "../../third-party-podspecs/RCT-Folly.podspec" RCTRequired: :path: "../../Libraries/RCTRequired" RCTTypeSafety: @@ -490,7 +490,7 @@ SPEC CHECKSUMS: CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f DoubleConversion: cde416483dac037923206447da6e1454df403714 FBLazyVector: 8ea0285646adaf7fa725c20ed737c49ee5ea680a - FBReactNativeSpec: e8f07c749b9cf184c819f5a8ca44b91ab61fca12 + FBReactNativeSpec: 29b1b8a11346e71351f3a2ba126439810edee362 Flipper: 33585e2d9810fe5528346be33bcf71b37bb7ae13 Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3 @@ -498,33 +498,33 @@ SPEC CHECKSUMS: Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7 FlipperKit: bc68102cd4952a258a23c9c1b316c7bec1fecf83 - Folly: b73c3869541e86821df3c387eb0af5f65addfab4 glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 + RCT-Folly: b39288cedafe50da43317ec7d91bcc8cc0abbf33 RCTRequired: 34582e9b3ebe69f244e091f37218d318406d5c4a - RCTTypeSafety: 1ade47a69b092cddf1e4ea21e0c5bdc65cc950b4 + RCTTypeSafety: 84db212a990ce622a28f1bcb1ac68c658e722373 React: cafb3c2321f7df55ce90dbf29d513799a79e4418 React-callinvoker: 0dada022d38b73e6e15b33e2a96476153f79bbf6 - React-Core: 6c6f6c40bb1e031de8a0fafce08c010edfef09ab - React-CoreModules: d13d148c851af5780f864be74bc2165140923dc7 - React-cxxreact: 4661b3295e62c6eaada084e2f826c70c71ef11ea - React-jsi: fe94132da767bfc4801968c2a12abae43e9a833e - React-jsiexecutor: 959bb48c75a3bfc1b1d2b991087a6d8df721cbcf + React-Core: d377a770bb13aa5120a6ce553f75f0e1cbc1aafe + React-CoreModules: f38b671f8df4c1c744ed69f00264539a7c4024b4 + React-cxxreact: de6de17eac6bbaa4f9fad46b66e7f0c4aaaf863d + React-jsi: 652ad7cb7ff8c87e0e9fb11e9ebcbbc70cdfe865 + React-jsiexecutor: f20d2b5986dbe3d0e94ccbf2d8da24e0d9c42cc9 React-jsinspector: 7fbf9b42b58b02943a0d89b0ba9fff0070f2de98 React-perflogger: 1f668f3e4d1adef1fafb3b95e7d6cf922113fe31 React-RCTActionSheet: 51c43beeb74ef41189e87fe9823e53ebf6210359 - React-RCTAnimation: 9d09196c641c1ebfef3a4e9ae670bcda5fadb420 - React-RCTBlob: 715489626cf44d28ee51e5277a4d559167351696 - React-RCTImage: 19151d2d071b05c3832a0b212473cafa4ea8948f - React-RCTLinking: 7c94c0f2fcc658cb4043dacb4f6621dca2f8f8b5 - React-RCTNetwork: 7596e84acacd5d0674e9743b55c5bf61a626af69 - React-RCTPushNotification: 88c9f47ff0d4391d5136d70745f15713cdc5f6bb - React-RCTSettings: a29c61f85f535ba2eff54d80bef2ea3cdb6e5fba - React-RCTTest: cfe25fcf70b04a747dba4326105db398250caa9a + React-RCTAnimation: 62f271148b71d0200773b4959e99a80f624182d4 + React-RCTBlob: b81d69c4dc7f7891a6a3ec969bba9b0a9801b062 + React-RCTImage: 37646ebc761e9f68781867e9e802afdadd18a3dc + React-RCTLinking: b5c261eb3befe7d5c62a4706ae904943e73f9c82 + React-RCTNetwork: 2f6c4ba283c9c2ea768fecc6c681d3ab9448b5f5 + React-RCTPushNotification: a4f86ef3d7c0cb3ee570108a62e39fcd296a5030 + React-RCTSettings: 5a76683d9cf7408b5f8c3306cda3eaf4db191fce + React-RCTTest: 090e9816044220c39462be109dab6d473d94b1c9 React-RCTText: 6c01963d3e562109f5548262b09b1b2bc260dd60 - React-RCTVibration: d42d73dafd9f63cf758656ee743aa80c566798ff + React-RCTVibration: 0997fcaf753c7ac0a341177db120eebc438484cf React-runtimeexecutor: 60dd6204a13f68a1aa1118870edcc604a791df2b - ReactCommon: 511b4a9ea129c129c6dbc982942007d195903a9a + ReactCommon: 1f231b4fbed866032aa084ca23973063bbb51927 Yoga: f7fa200d8c49f97b54c9421079e781fb900b5cae YogaKit: f782866e155069a2cca2517aafea43200b01fd5a diff --git a/packages/rn-tester/RCTTest/React-RCTTest.podspec b/packages/rn-tester/RCTTest/React-RCTTest.podspec index 11d424b809a..44be5efdb95 100644 --- a/packages/rn-tester/RCTTest/React-RCTTest.podspec +++ b/packages/rn-tester/RCTTest/React-RCTTest.podspec @@ -36,10 +36,10 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES", "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Folly\"" + "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\"" } - s.dependency "Folly", folly_version + s.dependency "RCT-Folly", folly_version s.dependency "React-Core", version s.dependency "React-CoreModules", version s.dependency "ReactCommon/turbomodule/core", version diff --git a/packages/rn-tester/RNTester/AppDelegate.mm b/packages/rn-tester/RNTester/AppDelegate.mm index c6989f859b2..4eb217c9704 100644 --- a/packages/rn-tester/RNTester/AppDelegate.mm +++ b/packages/rn-tester/RNTester/AppDelegate.mm @@ -8,6 +8,7 @@ #import "AppDelegate.h" #import +#import #import #import #import @@ -164,18 +165,20 @@ #endif __weak __typeof(self) weakSelf = self; - return std::make_unique([weakSelf, bridge](facebook::jsi::Runtime &runtime) { - if (!bridge) { - return; - } - __typeof(self) strongSelf = weakSelf; - if (strongSelf) { - facebook::react::RuntimeExecutor syncRuntimeExecutor = [&](std::function &&callback) { - callback(runtime); - }; - [strongSelf->_turboModuleManager installJSBindingWithRuntimeExecutor:syncRuntimeExecutor]; - } - }); + return std::make_unique( + facebook::react::RCTJSIExecutorRuntimeInstaller([weakSelf, bridge](facebook::jsi::Runtime &runtime) { + if (!bridge) { + return; + } + __typeof(self) strongSelf = weakSelf; + if (strongSelf) { + facebook::react::RuntimeExecutor syncRuntimeExecutor = [&](std::function &&callback) { + callback(runtime); + }; + [strongSelf->_turboModuleManager installJSBindingWithRuntimeExecutor:syncRuntimeExecutor]; + } + }) + ); } #pragma mark RCTTurboModuleManagerDelegate diff --git a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj index 80d17215c73..04b79666cd3 100644 --- a/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj +++ b/packages/rn-tester/RNTesterPods.xcodeproj/project.pbxproj @@ -586,7 +586,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n"; + shellScript = "export NODE_BINARY=node\nexport PROJECT_ROOT=$SRCROOT/..\nexport SOURCEMAP_FILE=../sourcemap.ios.map\n# export FORCE_BUNDLING=true\n\"$SRCROOT/../../scripts/react-native-xcode.sh\" $SRCROOT/../../packages/rn-tester/js/RNTesterApp.ios.js\n"; }; C1C7A9D58CE1D09515F20577 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; @@ -743,36 +743,6 @@ "$(inherited)", "FB_SONARKIT_ENABLED=1", ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_ROOT}/Headers/Public\"", - "\"${PODS_ROOT}/Headers/Public/DoubleConversion\"", - "\"${PODS_ROOT}/Headers/Public/React-ART\"", - "\"${PODS_ROOT}/Headers/Public/React-Core\"", - "\"${PODS_ROOT}/Headers/Public/React-Fabric\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTActionSheet\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTAnimation\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTBlob\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTFabric\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTGeolocation\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTImage\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTLinking\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTNetwork\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTPushNotification\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTSettings\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTText\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTVibration\"", - "\"${PODS_ROOT}/Headers/Public/React-cxxreact\"", - "\"${PODS_ROOT}/Headers/Public/React-fishhook\"", - "\"${PODS_ROOT}/Headers/Public/React-jsi\"", - "\"${PODS_ROOT}/Headers/Public/React-jsiexecutor\"", - "\"${PODS_ROOT}/Headers/Public/React-jsinspector\"", - "\"${PODS_ROOT}/Headers/Public/glog\"", - "\"${PODS_ROOT}/Headers/Public/libevent\"", - "\"$(PODS_ROOT)/boost-for-react-native\"", - "\"$(PODS_ROOT)/Folly\"", - "\"$(PODS_ROOT)/DoubleConversion\"", - ); INFOPLIST_FILE = "$(SRCROOT)/RNTester/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -811,36 +781,6 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_CXX_LANGUAGE_STANDARD = "c++14"; DEVELOPMENT_TEAM = ""; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "\"${PODS_ROOT}/Headers/Public\"", - "\"${PODS_ROOT}/Headers/Public/DoubleConversion\"", - "\"${PODS_ROOT}/Headers/Public/React-ART\"", - "\"${PODS_ROOT}/Headers/Public/React-Core\"", - "\"${PODS_ROOT}/Headers/Public/React-Fabric\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTActionSheet\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTAnimation\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTBlob\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTFabric\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTGeolocation\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTImage\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTLinking\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTNetwork\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTPushNotification\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTSettings\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTText\"", - "\"${PODS_ROOT}/Headers/Public/React-RCTVibration\"", - "\"${PODS_ROOT}/Headers/Public/React-cxxreact\"", - "\"${PODS_ROOT}/Headers/Public/React-fishhook\"", - "\"${PODS_ROOT}/Headers/Public/React-jsi\"", - "\"${PODS_ROOT}/Headers/Public/React-jsiexecutor\"", - "\"${PODS_ROOT}/Headers/Public/React-jsinspector\"", - "\"${PODS_ROOT}/Headers/Public/glog\"", - "\"${PODS_ROOT}/Headers/Public/libevent\"", - "\"$(PODS_ROOT)/boost-for-react-native\"", - "\"$(PODS_ROOT)/Folly\"", - "\"$(PODS_ROOT)/DoubleConversion\"", - ); INFOPLIST_FILE = "$(SRCROOT)/RNTester/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index db8586c788e..98743b168b6 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -122,24 +122,83 @@ source "$REACT_NATIVE_DIR/scripts/node-binary.sh" [ -z "$BUNDLE_COMMAND" ] && BUNDLE_COMMAND="bundle" +[ -z "$HERMES_PATH" ] && HERMES_PATH="$PROJECT_ROOT/node_modules/hermes-engine-darwin/destroot/bin/hermesc" + +[ -z "$COMPOSE_SOURCEMAP_PATH" ] && COMPOSE_SOURCEMAP_PATH="$REACT_NATIVE_DIR/scripts/compose-source-maps.js" + if [[ -z "$BUNDLE_CONFIG" ]]; then CONFIG_ARG="" else CONFIG_ARG="--config $BUNDLE_CONFIG" fi -BUNDLE_FILE="$DEST/main.jsbundle" +BUNDLE_FILE="$CONFIGURATION_BUILD_DIR/main.jsbundle" + +EXTRA_ARGS= + +case "$PLATFORM_NAME" in + "macosx") + BUNDLE_PLATFORM="macos" + ;; + *) + BUNDLE_PLATFORM="ios" + ;; +esac + +USE_HERMES= +if [[ "$BUNDLE_PLATFORM" == "macos" && -f "$HERMES_PATH" ]]; then + USE_HERMES=true +fi + +EMIT_SOURCEMAP= +if [[ ! -z "$SOURCEMAP_FILE" ]]; then + EMIT_SOURCEMAP=true +fi + +PACKAGER_SOURCEMAP_FILE= +if [[ $EMIT_SOURCEMAP == true ]]; then + if [[ $USE_HERMES == true ]]; then + PACKAGER_SOURCEMAP_FILE="$CONFIGURATION_BUILD_DIR/$(basename $SOURCEMAP_FILE)" + else + PACKAGER_SOURCEMAP_FILE="$SOURCEMAP_FILE" + fi + EXTRA_ARGS="$EXTRA_ARGS --sourcemap-output $PACKAGER_SOURCEMAP_FILE" +fi "$NODE_BINARY" $NODE_ARGS "$CLI_PATH" $BUNDLE_COMMAND \ $CONFIG_ARG \ --entry-file "$ENTRY_FILE" \ - --platform ios \ + --platform "$BUNDLE_PLATFORM" \ --dev $DEV \ --reset-cache \ --bundle-output "$BUNDLE_FILE" \ --assets-dest "$DEST" \ + $EXTRA_ARGS \ $EXTRA_PACKAGER_ARGS +if [[ $USE_HERMES != true ]]; then + mv "$BUNDLE_FILE" "$DEST/" + BUNDLE_FILE="$DEST/main.jsbundle" +else + EXTRA_COMPILER_ARGS= + if [[ $DEV == true ]]; then + EXTRA_COMPILER_ARGS=-Og + else + EXTRA_COMPILER_ARGS=-O + fi + if [[ $EMIT_SOURCEMAP == true ]]; then + EXTRA_COMPILER_ARGS="$EXTRA_COMPILER_ARGS -output-source-map" + fi + HBC_FILE="$CONFIGURATION_BUILD_DIR/$(basename $BUNDLE_FILE)" + "$HERMES_PATH" -emit-binary $EXTRA_COMPILER_ARGS -out "$HBC_FILE" "$BUNDLE_FILE" + mv "$HBC_FILE" "$DEST/" + BUNDLE_FILE="$DEST/main.jsbundle" + if [[ $EMIT_SOURCEMAP == true ]]; then + HBC_SOURCEMAP_FILE="$HBC_FILE.map" + "$NODE_BINARY" "$COMPOSE_SOURCEMAP_PATH" "$PACKAGER_SOURCEMAP_FILE" "$HBC_SOURCEMAP_FILE" -o "$SOURCEMAP_FILE" + fi +fi + if [[ $DEV != true && ! -f "$BUNDLE_FILE" ]]; then echo "error: File $BUNDLE_FILE does not exist. This must be a bug with" >&2 echo "React Native, please report it here: https://github.com/facebook/react-native/issues" diff --git a/scripts/react_native_pods.rb b/scripts/react_native_pods.rb index 73bb9ad55a3..ffdbfee75bf 100644 --- a/scripts/react_native_pods.rb +++ b/scripts/react_native_pods.rb @@ -6,6 +6,7 @@ def use_react_native! (options={}) # The prefix to the react-native prefix = options[:path] ||= "../node_modules/react-native" + hermes_engine_prefix = options[:hermes_path] ||= "../node_modules/hermes-engine-darwin" # Include Fabric dependencies fabric_enabled = options[:fabric_enabled] ||= false @@ -13,6 +14,9 @@ def use_react_native! (options={}) # Include DevSupport dependency production = options[:production] ||= false + # Include Hermes dependencies + hermes_enabled = options[:hermes_enabled] ||= false + # The Pods which should be included in all projects pod 'FBLazyVector', :path => "#{prefix}/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "#{prefix}/Libraries/FBReactNativeSpec" @@ -48,14 +52,20 @@ def use_react_native! (options={}) pod 'DoubleConversion', :podspec => "#{prefix}/third-party-podspecs/DoubleConversion.podspec" pod 'glog', :podspec => "#{prefix}/third-party-podspecs/glog.podspec" - pod 'Folly', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec" + pod 'RCT-Folly', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec" if fabric_enabled pod 'React-Fabric', :path => "#{prefix}/ReactCommon" pod 'React-graphics', :path => "#{prefix}/ReactCommon/fabric/graphics" pod 'React-jsi/Fabric', :path => "#{prefix}/ReactCommon/jsi" pod 'React-RCTFabric', :path => "#{prefix}/React" - pod 'Folly/Fabric', :podspec => "#{prefix}/third-party-podspecs/Folly.podspec" + pod 'RCT-Folly/Fabric', :podspec => "#{prefix}/third-party-podspecs/RCT-Folly.podspec" + end + + if hermes_enabled + pod 'React-Core/Hermes', :path => "#{prefix}/" + pod 'hermes', :path => hermes_engine_prefix + pod 'libevent', :podspec => "#{prefix}/third-party-podspecs/libevent.podspec" end end diff --git a/third-party-podspecs/Folly.podspec b/third-party-podspecs/Folly.podspec deleted file mode 100644 index 35a0522acd8..00000000000 --- a/third-party-podspecs/Folly.podspec +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -Pod::Spec.new do |spec| - spec.name = 'Folly' - spec.version = '2020.01.13.00' - spec.license = { :type => 'Apache License, Version 2.0' } - spec.homepage = 'https://github.com/facebook/folly' - spec.summary = 'An open-source C++ library developed and used at Facebook.' - spec.authors = 'Facebook' - spec.source = { :git => 'https://github.com/facebook/folly.git', - :tag => "v#{spec.version}" } - spec.module_name = 'folly' - spec.dependency 'boost-for-react-native' - spec.dependency 'DoubleConversion' - spec.dependency 'glog' - spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_PTHREAD=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation' - spec.source_files = 'folly/String.cpp', - 'folly/Conv.cpp', - 'folly/Demangle.cpp', - 'folly/FileUtil.cpp', - 'folly/Format.cpp', - 'folly/lang/SafeAssert.cpp', - 'folly/ScopeGuard.cpp', - 'folly/Unicode.cpp', - 'folly/dynamic.cpp', - 'folly/json.cpp', - 'folly/json_pointer.cpp', - 'folly/container/detail/F14Table.cpp', - 'folly/detail/Demangle.cpp', - 'folly/detail/UniqueInstance.cpp', - 'folly/hash/SpookyHashV2.cpp', - 'folly/lang/Assume.cpp', - 'folly/lang/CString.cpp', - 'folly/memory/detail/MallocImpl.cpp', - 'folly/net/NetOps.cpp', - 'folly/portability/SysUio.cpp' - - # workaround for https://github.com/facebook/react-native/issues/14326 - spec.preserve_paths = 'folly/*.h', - 'folly/container/*.h', - 'folly/container/detail/*.h', - 'folly/detail/*.h', - 'folly/functional/*.h', - 'folly/hash/*.h', - 'folly/lang/*.h', - 'folly/memory/*.h', - 'folly/memory/detail/*.h', - 'folly/net/*.h', - 'folly/net/detail/*.h', - 'folly/portability/*.h' - spec.libraries = "stdc++" - spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", - "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", - "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\"" } - - spec.default_subspec = 'Default' - - spec.subspec 'Default' do - # no-op - end - - spec.subspec 'Fabric' do |fabric| - fabric.source_files = 'folly/SharedMutex.cpp', - 'folly/concurrency/CacheLocality.cpp', - 'folly/detail/Futex.cpp', - 'folly/synchronization/ParkingLot.cpp', - 'folly/portability/Malloc.cpp' - fabric.preserve_paths = 'folly/concurrency/CacheLocality.h', - 'folly/synchronization/ParkingLot.h', - 'folly/synchronization/SanitizeThread.h', - 'folly/system/ThreadId.h' - end - - # Pinning to the same version as React.podspec. - spec.platforms = { :ios => "10.0", :tvos => "10.0" } -end diff --git a/third-party-podspecs/RCT-Folly.podspec b/third-party-podspecs/RCT-Folly.podspec new file mode 100644 index 00000000000..ae1d4f471b6 --- /dev/null +++ b/third-party-podspecs/RCT-Folly.podspec @@ -0,0 +1,127 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +Pod::Spec.new do |spec| + spec.name = 'RCT-Folly' + spec.version = '2020.01.13.00' + spec.license = { :type => 'Apache License, Version 2.0' } + spec.homepage = 'https://github.com/facebook/folly' + spec.summary = 'An open-source C++ library developed and used at Facebook.' + spec.authors = 'Facebook' + spec.source = { :git => 'https://github.com/facebook/folly.git', + :tag => "v#{spec.version}" } + spec.module_name = 'folly' + spec.header_mappings_dir = '.' + spec.dependency 'boost-for-react-native' + spec.dependency 'DoubleConversion' + spec.dependency 'glog' + spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_PTHREAD=1 -Wno-comma -Wno-shorten-64-to-32 -Wno-documentation' + spec.source_files = 'folly/String.cpp', + 'folly/Conv.cpp', + 'folly/Demangle.cpp', + 'folly/FileUtil.cpp', + 'folly/Format.cpp', + 'folly/lang/SafeAssert.cpp', + 'folly/ScopeGuard.cpp', + 'folly/Unicode.cpp', + 'folly/dynamic.cpp', + 'folly/json.cpp', + 'folly/json_pointer.cpp', + 'folly/container/detail/F14Table.cpp', + 'folly/detail/Demangle.cpp', + 'folly/detail/UniqueInstance.cpp', + 'folly/hash/SpookyHashV2.cpp', + 'folly/lang/Assume.cpp', + 'folly/lang/CString.cpp', + 'folly/memory/detail/MallocImpl.cpp', + 'folly/net/NetOps.cpp', + 'folly/portability/SysUio.cpp', + 'folly/*.h', + 'folly/container/*.h', + 'folly/container/detail/*.h', + 'folly/detail/*.h', + 'folly/functional/*.h', + 'folly/hash/*.h', + 'folly/lang/*.h', + 'folly/memory/*.h', + 'folly/memory/detail/*.h', + 'folly/net/*.h', + 'folly/net/detail/*.h', + 'folly/portability/*.h' + + # workaround for https://github.com/facebook/react-native/issues/14326 + spec.preserve_paths = 'folly/*.h', + 'folly/container/*.h', + 'folly/container/detail/*.h', + 'folly/detail/*.h', + 'folly/functional/*.h', + 'folly/hash/*.h', + 'folly/lang/*.h', + 'folly/memory/*.h', + 'folly/memory/detail/*.h', + 'folly/net/*.h', + 'folly/net/detail/*.h', + 'folly/portability/*.h' + spec.libraries = "stdc++" + spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO", + "CLANG_CXX_LANGUAGE_STANDARD" => "c++14", + "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\"" } + + # 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-for-react-native\"" } + + spec.default_subspec = 'Default' + + spec.subspec 'Default' do + # no-op + end + + spec.subspec 'Fabric' do |fabric| + fabric.source_files = 'folly/SharedMutex.cpp', + 'folly/concurrency/CacheLocality.cpp', + 'folly/detail/Futex.cpp', + 'folly/synchronization/ParkingLot.cpp', + 'folly/portability/Malloc.cpp' + fabric.preserve_paths = 'folly/concurrency/CacheLocality.h', + 'folly/synchronization/ParkingLot.h', + 'folly/synchronization/SanitizeThread.h', + 'folly/system/ThreadId.h' + end + + spec.subspec 'Futures' do |futures| + futures.dependency 'libevent' + futures.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => ["$(inherited)", "$(PODS_ROOT)/Headers/Public/libevent/event"] } + futures.source_files = 'folly/futures/*.{h,cpp}', + 'folly/futures/detail/*.{h,cpp}', + 'folly/executors/*.{h,cpp}', + 'folly/executors/thread_factory/{NamedThreadFactory,ThreadFactory}.{h,cpp}', + 'folly/executors/task_queue/{BlockingQueue,LifoSemMPMCQueue,PriorityLifoSemMPMCQueue}.{h,cpp}', + 'folly/concurrency/*.{h,cpp}', + 'folly/system/{ThreadId,ThreadName}.{h,cpp}', + 'folly/synchronization/*.{h,cpp}', + 'folly/synchronization/detail/*.{h,cpp}', + 'folly/experimental/{ExecutionObserver,ReadMostlySharedPtr,TLRefCount}.{h,cpp}', + 'folly/io/async/{AsyncTimeout,DelayedDestruction,DelayedDestructionBase,EventBase,EventBaseManager,EventHandler,EventUtil,HHWheelTimer,NotificationQueue,Request,TimeoutManager,VirtualEventBase}.{h,cpp}', + 'folly/io/{Cursor,Cursor-inl,IOBuf,IOBufQueue}.{h,cpp}', + 'folly/tracing/StaticTracepoint.{h,cpp}', + 'folly/{Executor,ExceptionWrapper,ExceptionWrapper-inl,FileUtil,Singleton,SharedMutex}.{h,cpp}', + 'folly/detail/{AtFork,Futex,Futex-inl,MemoryIdler,StaticSingletonManager,ThreadLocalDetail}.{h,cpp}', + 'folly/lang/SafeAssert.{h,cpp}', + 'folly/memory/MallctlHelper.{h,cpp}', + 'folly/portability/SysUio.{h,cpp}' + # TODO: Perhaps some of the wildcards above can be further trimmed down with some of these: + # + # 'folly/executors/{DrivableExecutor,InlineExecutor,QueuedImmediateExecutor,TimedDrivableExecutor}.{h,cpp}', + # 'folly/concurrency/{CacheLocality,UnboundedQueue}.{h,cpp}', + # 'folly/system/ThreadId.h', + # 'folly/synchronization/Hazptr{,-fwd,Domain,Holder,Obj,ObjLinked,Rec,ThrLocal}.{h,cpp}', + # 'folly/synchronization/{AsymmetricMemoryBarrier,AtomicStruct,Baton,MicroSpinLock,ParkingLot,RWSpinLock,SanitizeThread,SaturatingSemaphore,WaitOptions}.{h,cpp}', + # 'folly/synchronization/detail/{AtomicUtils,Sleeper,Spin}.{h,cpp}', + # 'folly/experimental/{ReadMostlySharedPtr,TLRefCount}.h', + end + + # Pinning to the same version as React.podspec. + spec.platforms = { :ios => "10.0", :tvos => "10.0" } +end diff --git a/third-party-podspecs/libevent.podspec b/third-party-podspecs/libevent.podspec new file mode 100644 index 00000000000..000e39e50d7 --- /dev/null +++ b/third-party-podspecs/libevent.podspec @@ -0,0 +1,575 @@ +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + +# Because libevent is also relied on by Flipper and *with* OpenSSL bindings, +# building it as a prebuilt binary may lead to hard to satisfy permutations, if +# we'd ever try to build this for other Apple platforms besides macOS. Therefore +# let Xcode build it from source instead. +# +# Generated with: +# +# $ mkdir build && cd build +# $ cmake -G Ninja .. \ +# -DEVENT__DISABLE_OPENSSL:BOOL=ON \ +# -DEVENT__DISABLE_BENCHMARK:BOOL=ON \ +# -DEVENT__DISABLE_TESTS:BOOL=ON \ +# -DEVENT__DISABLE_REGRESS:BOOL=ON \ +# -DEVENT__DISABLE_SAMPLES:BOOL=ON +# $ cat include/event2/event-config.h +# +CONFIG_WITHOUT_OPENSSL = <<-END_OF_CONFIG +/* event-config.h + * + * This file was generated by cmake when the makefiles were generated. + * + * DO NOT EDIT THIS FILE. + * + * Do not rely on macros in this file existing in later versions. + */ +#ifndef EVENT2_EVENT_CONFIG_H_INCLUDED_ +#define EVENT2_EVENT_CONFIG_H_INCLUDED_ + +/* Numeric representation of the version */ +#define EVENT__NUMERIC_VERSION 0x02020001 +#define EVENT__PACKAGE_VERSION "2.2.0" + +#define EVENT__VERSION_MAJOR 2 +#define EVENT__VERSION_MINOR 2 +#define EVENT__VERSION_PATCH 0 + +/* Version number of package */ +#define EVENT__VERSION "2.2.0-alpha-dev" + +/* Name of package */ +#define EVENT__PACKAGE "libevent" + +/* Define to the address where bug reports for this package should be sent. */ +#define EVENT__PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define EVENT__PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define EVENT__PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define EVENT__PACKAGE_TARNAME "" + +/* Define if libevent should build without support for a debug mode */ +/* #undef EVENT__DISABLE_DEBUG_MODE */ + +/* Define if libevent should not allow replacing the mm functions */ +/* #undef EVENT__DISABLE_MM_REPLACEMENT */ + +/* Define if libevent should not be compiled with thread support */ +/* #undef EVENT__DISABLE_THREAD_SUPPORT */ + +/* Define to 1 if you have the `accept4' function. */ +/* #undef EVENT__HAVE_ACCEPT4 */ + +/* Define to 1 if you have the `arc4random' function. */ +#define EVENT__HAVE_ARC4RANDOM 1 + +/* Define to 1 if you have the `arc4random_buf' function. */ +#define EVENT__HAVE_ARC4RANDOM_BUF 1 + +/* Define to 1 if you have the `arc4random_addrandom' function. */ +#define EVENT__HAVE_ARC4RANDOM_ADDRANDOM 1 + +/* Define if clock_gettime is available in libc */ +#define EVENT__DNS_USE_CPU_CLOCK_FOR_ID 1 + +/* Define is no secure id variant is available */ +/* #undef EVENT__DNS_USE_GETTIMEOFDAY_FOR_ID */ +/* #undef EVENT__DNS_USE_FTIME_FOR_ID */ + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define EVENT__HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the declaration of `CTL_KERN'. */ +#define EVENT__HAVE_DECL_CTL_KERN 1 + +/* Define to 1 if you have the declaration of `KERN_ARND'. */ +#define EVENT__HAVE_DECL_KERN_ARND 0 + +/* Define to 1 if you have `getrandom' function. */ +/* #undef EVENT__HAVE_GETRANDOM */ + +/* Define if /dev/poll is available */ +/* #undef EVENT__HAVE_DEVPOLL */ + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_NETDB_H 1 + +/* Define to 1 if fd_mask type is defined */ +#define EVENT__HAVE_FD_MASK 1 + +/* Define to 1 if the header file defines TAILQ_FOREACH. */ +#define EVENT__HAVE_TAILQFOREACH 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_DLFCN_H 1 + +/* Define if your system supports the epoll system calls */ +/* #undef EVENT__HAVE_EPOLL */ + +/* Define to 1 if you have the `epoll_create1' function. */ +/* #undef EVENT__HAVE_EPOLL_CREATE1 */ + +/* Define to 1 if you have the `epoll_ctl' function. */ +/* #undef EVENT__HAVE_EPOLL_CTL */ + +/* Define if your system supports the wepoll module */ +/* #undef EVENT__HAVE_WEPOLL */ + +/* Define to 1 if you have the `eventfd' function. */ +/* #undef EVENT__HAVE_EVENTFD */ + +/* Define if your system supports event ports */ +/* #undef EVENT__HAVE_EVENT_PORTS */ + +/* Define to 1 if you have the `fcntl' function. */ +#define EVENT__HAVE_FCNTL 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `getaddrinfo' function. */ +#define EVENT__HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getegid' function. */ +#define EVENT__HAVE_GETEGID 1 + +/* Define to 1 if you have the `geteuid' function. */ +#define EVENT__HAVE_GETEUID 1 + +/* TODO: Check for different gethostname argument counts. CheckPrototypeDefinition.cmake can be used. */ +/* Define this if you have any gethostbyname_r() */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R */ + +/* Define this if gethostbyname_r takes 3 arguments */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R_3_ARG */ + +/* Define this if gethostbyname_r takes 5 arguments */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R_5_ARG */ + +/* Define this if gethostbyname_r takes 6 arguments */ +/* #undef EVENT__HAVE_GETHOSTBYNAME_R_6_ARG */ + +/* Define to 1 if you have the `getifaddrs' function. */ +#define EVENT__HAVE_GETIFADDRS 1 + +/* Define to 1 if you have the `getnameinfo' function. */ +#define EVENT__HAVE_GETNAMEINFO 1 + +/* Define to 1 if you have the `getprotobynumber' function. */ +#define EVENT__HAVE_GETPROTOBYNUMBER 1 + +/* Define to 1 if you have the `getservbyname' function. */ +#define EVENT__HAVE_GETSERVBYNAME 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define EVENT__HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_IFADDRS_H 1 + +/* Define to 1 if you have the `inet_ntop' function. */ +#define EVENT__HAVE_INET_NTOP 1 + +/* Define to 1 if you have the `inet_pton' function. */ +#define EVENT__HAVE_INET_PTON 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `issetugid' function. */ +#define EVENT__HAVE_ISSETUGID 1 + +/* Define to 1 if you have the `kqueue' function. */ +#define EVENT__HAVE_KQUEUE 1 + +/* Define if the system has zlib */ +/* #undef EVENT__HAVE_LIBZ */ + +/* Define to 1 if you have the `mach_absolute_time' function. */ +#define EVENT__HAVE_MACH_ABSOLUTE_TIME 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_MACH_MACH_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_MACH_MACH_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mmap' function. */ +#define EVENT__HAVE_MMAP 1 + +/* Define to 1 if you have the `nanosleep' function. */ +#define EVENT__HAVE_NANOSLEEP 1 + +/* Define to 1 if you have the `usleep' function. */ +#define EVENT__HAVE_USLEEP 1 + +/* Define to 1 if you have the header file. */ +/* #undef EVENT__HAVE_NETINET_IN6_H */ + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_NETINET_TCP_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_UN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef EVENT__HAVE_AFUNIX_H */ + +/* Define if the system has openssl */ +/* #undef EVENT__HAVE_OPENSSL */ + +/* Define to 1 if you have the `pipe' function. */ +#define EVENT__HAVE_PIPE 1 + +/* Define to 1 if you have the `pipe2' function. */ +/* #undef EVENT__HAVE_PIPE2 */ + +/* Define to 1 if you have the `poll' function. */ +#define EVENT__HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_POLL_H 1 + +/* Define to 1 if you have the `port_create' function. */ +/* #undef EVENT__HAVE_PORT_CREATE */ + +/* Define to 1 if you have the header file. */ +/* #undef EVENT__HAVE_PORT_H */ + +/* Define if we have pthreads on this system */ +#define EVENT__HAVE_PTHREADS 1 + +/* Define to 1 if you have the `putenv' function. */ +#define EVENT__HAVE_PUTENV 1 + +/* Define to 1 if the system has the type `sa_family_t'. */ +#define EVENT__HAVE_SA_FAMILY_T 1 + +/* Define to 1 if you have the `select' function. */ +#define EVENT__HAVE_SELECT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define EVENT__HAVE_SETENV 1 + +/* Define if F_SETFD is defined in */ +#define EVENT__HAVE_SETFD 1 + +/* Define to 1 if you have the `setrlimit' function. */ +#define EVENT__HAVE_SETRLIMIT 1 + +/* Define to 1 if you have the `sendfile' function. */ +#define EVENT__HAVE_SENDFILE 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define EVENT__HAVE_SIGACTION 1 + +/* Define to 1 if you have the `signal' function. */ +#define EVENT__HAVE_SIGNAL 1 + +/* Define to 1 if you have the `strsignal' function. */ +#define EVENT__HAVE_STRSIGNAL 1 + +/* Define to 1 if you have the `splice' function. */ +/* #undef EVENT__HAVE_SPLICE */ + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_STDDEF_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define EVENT__HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strsep' function. */ +#define EVENT__HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtok_r' function. */ +#define EVENT__HAVE_STRTOK_R 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define EVENT__HAVE_STRTOLL 1 + +/* Define to 1 if you have the `_gmtime64_s' function. */ +/* #undef EVENT__HAVE__GMTIME64_S */ + +/* Define to 1 if you have the `_gmtime64' function. */ +/* #undef EVENT__HAVE__GMTIME64 */ + +/* Define to 1 if the system has the type `struct addrinfo'. */ +#define EVENT__HAVE_STRUCT_ADDRINFO 1 + +/* Define to 1 if the system has the type `struct in6_addr'. */ +#define EVENT__HAVE_STRUCT_IN6_ADDR 1 + +/* Define to 1 if `s6_addr16' is member of `struct in6_addr'. */ +/* #undef EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR16 */ + +/* Define to 1 if `s6_addr32' is member of `struct in6_addr'. */ +/* #undef EVENT__HAVE_STRUCT_IN6_ADDR_S6_ADDR32 */ + +/* Define to 1 if the system has the type `struct sockaddr_in6'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_IN6 1 + +/* Define to 1 if `sin6_len' is member of `struct sockaddr_in6'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN 1 + +/* Define to 1 if `sin_len' is member of `struct sockaddr_in'. */ +/* #undef EVENT__HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ + +/* Define to 1 if the system has the type `struct sockaddr_un'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_UN 1 + +/* Define to 1 if the system has the type `struct sockaddr_storage'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE 1 + +/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */ +#define EVENT__HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 + +/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */ +/* #undef EVENT__HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ + +/* Define to 1 if the system has the type `struct linger'. */ +#define EVENT__HAVE_STRUCT_LINGER 1 + +/* Define to 1 if you have the `sysctl' function. */ +#define EVENT__HAVE_SYSCTL 1 + +/* Define to 1 if you have the header file. */ +/* #undef EVENT__HAVE_SYS_EPOLL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef EVENT__HAVE_SYS_EVENTFD_H */ + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_EVENT_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_QUEUE_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef EVENT__HAVE_SYS_SENDFILE_H */ + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_RANDOM_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_SYSCTL_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef EVENT__HAVE_SYS_TIMERFD_H */ + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_ERRNO_H 1 + +/* Define if TAILQ_FOREACH is defined in */ +#define EVENT__HAVE_TAILQFOREACH 1 + +/* Define if timeradd is defined in */ +#define EVENT__HAVE_TIMERADD 1 + +/* Define if timerclear is defined in */ +#define EVENT__HAVE_TIMERCLEAR 1 + +/* Define if timercmp is defined in */ +#define EVENT__HAVE_TIMERCMP 1 + + +/* Define to 1 if you have the `timerfd_create' function. */ +/* #undef EVENT__HAVE_TIMERFD_CREATE */ + +/* Define if timerisset is defined in */ +#define EVENT__HAVE_TIMERISSET 1 + +/* Define to 1 if the system has the type `uint8_t'. */ +#define EVENT__HAVE_UINT8_T 1 + +/* Define to 1 if the system has the type `uint16_t'. */ +#define EVENT__HAVE_UINT16_T 1 + +/* Define to 1 if the system has the type `uint32_t'. */ +#define EVENT__HAVE_UINT32_T 1 + +/* Define to 1 if the system has the type `uint64_t'. */ +#define EVENT__HAVE_UINT64_T 1 + +/* Define to 1 if the system has the type `uintptr_t'. */ +#define EVENT__HAVE_UINTPTR_T 1 + +/* Define to 1 if you have the `umask' function. */ +#define EVENT__HAVE_UMASK 1 + +/* Define to 1 if you have the header file. */ +#define EVENT__HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define EVENT__HAVE_UNSETENV 1 + +/* Define to 1 if you have the `vasprintf' function. */ +#define EVENT__HAVE_VASPRINTF 1 + +/* Define if kqueue works correctly with pipes */ +#define EVENT__HAVE_WORKING_KQUEUE 1 + +#ifdef __USE_UNUSED_DEFINITIONS__ +/* Define to necessary symbol if this constant uses a non-standard name on your system. */ +/* XXX: Hello, this isn't even used, nor is it defined anywhere... - Ellzey */ +#define EVENT__PTHREAD_CREATE_JOINABLE +#endif + +/* The size of `pthread_t', as computed by sizeof. */ +#define EVENT__SIZEOF_PTHREAD_T 8 + +/* The size of a `int', as computed by sizeof. */ +#define EVENT__SIZEOF_INT 4 + +/* The size of a `long', as computed by sizeof. */ +#define EVENT__SIZEOF_LONG 8 + +/* The size of a `long long', as computed by sizeof. */ +#define EVENT__SIZEOF_LONG_LONG 8 + +/* The size of `off_t', as computed by sizeof. */ +#define EVENT__SIZEOF_OFF_T 8 + +#define EVENT__SIZEOF_SSIZE_T 8 + + +/* The size of a `short', as computed by sizeof. */ +#define EVENT__SIZEOF_SHORT 2 + +/* The size of `size_t', as computed by sizeof. */ +#define EVENT__SIZEOF_SIZE_T 8 + +/* Define to 1 if you can safely include both and . */ +/* #undef EVENT__TIME_WITH_SYS_TIME */ + +/* The size of `socklen_t', as computed by sizeof. */ +#define EVENT__SIZEOF_SOCKLEN_T 4 + +/* The size of 'void *', as computer by sizeof */ +#define EVENT__SIZEOF_VOID_P 8 + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* why not c++? + * + * and are we really expected to use EVENT__inline everywhere, + * shouldn't we just do: + * ifdef EVENT__inline + * define inline EVENT__inline + * + * - Ellzey + */ + +#define EVENT__inline inline +#endif + +#define EVENT__HAVE___func__ 1 +#define EVENT__HAVE___FUNCTION__ 1 + +/* Define to `unsigned' if does not define. */ +#define EVENT__size_t size_t + +/* Define to unsigned int if you dont have it */ +#define EVENT__socklen_t socklen_t + +/* Define to `int' if does not define. */ +#define EVENT__ssize_t ssize_t + +#endif /* \EVENT2_EVENT_CONFIG_H_INCLUDED_ */ +END_OF_CONFIG + +Pod::Spec.new do |spec| + spec.name = "libevent" + spec.version = "2.1.11" + spec.summary = "Event notification library" + spec.description = "The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a timeout has been reached. Furthermore, libevent also support callbacks due to signals or regular timeouts." + spec.homepage = "https://libevent.org" + spec.license = { :type => "BSD 3-Clause", :file => "LICENSE" } + spec.author = "Niels Provos and Nick Mathewson" + spec.platforms = { :osx => "10.13" } + spec.source = { :git => "https://github.com/libevent/libevent.git", :tag => "release-#{spec.version}-stable" } + spec.default_subspec = "core" + spec.prepare_command = "touch evconfig-private.h; echo -e #{Shellwords.escape(CONFIG_WITHOUT_OPENSSL)} > include/event2/event-config.h" + + # This subspec only exists so we can namespace these headers. + spec.subspec "event2-headers" do |ss| + ss.source_files = "include/event2/*.h" + ss.public_header_files = "include/event2/*.h" + ss.header_dir = "event2" + end + + spec.subspec "core" do |ss| + ss.dependency "libevent/event2-headers" + ss.source_files = + "include/*.h", "*-{internal,private}.h", + "buffer.c", "bufferevent.c", "bufferevent_filter.c", "bufferevent_pair.c", "bufferevent_ratelim.c", "bufferevent_sock.c", + "event.c", "evmap.c", "evthread.c", "evutil.c", "evutil_rand.c", "evutil_time.c", + "kqueue.c", "listener.c", "log.c", "poll.c", "select.c", "signal.c", "strlcpy.c", "watch.c", + "evdns.c", "event_tagging.c", "evrpc.c", "http.c" + ss.private_header_files = "*-{internal,private}.h" + ss.public_header_files = "include/*.h" + end +end