mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove unused dependency on Folly Futures (#40862)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/40862 The last usages of Folly Futures were deleted in D49073914, so we can remove this dependency from React Native. ## Changelog: [Internal] - remove folly usage in React-hermes Reviewed By: NickGerleman, cipolleschi Differential Revision: D50223640 fbshipit-source-id: 792fd7696c1463a81e25dbef7713620486cc94c7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
70c77f4173
commit
3d5324ad89
@@ -190,7 +190,6 @@ add_executable(reactnative_unittest
|
||||
|
||||
target_link_libraries(reactnative_unittest
|
||||
folly_runtime
|
||||
folly_futures
|
||||
glog
|
||||
glog_init
|
||||
gtest_main
|
||||
|
||||
-58
@@ -68,61 +68,3 @@ target_compile_options(folly_runtime PUBLIC ${folly_FLAGS})
|
||||
|
||||
target_include_directories(folly_runtime PUBLIC .)
|
||||
target_link_libraries(folly_runtime glog double-conversion boost fmt)
|
||||
|
||||
#####################
|
||||
### folly_futures ###
|
||||
#####################
|
||||
|
||||
add_library(folly_futures STATIC
|
||||
folly/CancellationToken.cpp
|
||||
folly/ExceptionWrapper.cpp
|
||||
folly/ExceptionString.cpp
|
||||
folly/Executor.cpp
|
||||
folly/Singleton.cpp
|
||||
folly/SingletonThreadLocal.cpp
|
||||
folly/Try.cpp
|
||||
folly/concurrency/CacheLocality.cpp
|
||||
folly/detail/AsyncTrace.cpp
|
||||
folly/detail/MemoryIdler.cpp
|
||||
folly/detail/ThreadLocalDetail.cpp
|
||||
folly/fibers/Baton.cpp
|
||||
folly/fibers/FiberManager.cpp
|
||||
folly/fibers/Fiber.cpp
|
||||
folly/fibers/GuardPageAllocator.cpp
|
||||
folly/futures/detail/Core.cpp
|
||||
folly/futures/Future.cpp
|
||||
folly/futures/ThreadWheelTimekeeper.cpp
|
||||
folly/executors/ExecutorWithPriority.cpp
|
||||
folly/executors/InlineExecutor.cpp
|
||||
folly/executors/TimedDrivableExecutor.cpp
|
||||
folly/executors/QueuedImmediateExecutor.cpp
|
||||
folly/io/async/AsyncTimeout.cpp
|
||||
folly/io/async/EventBase.cpp
|
||||
folly/io/async/EventBaseBackendBase.cpp
|
||||
folly/io/async/EventBaseLocal.cpp
|
||||
folly/io/async/EventHandler.cpp
|
||||
folly/io/async/HHWheelTimer.cpp
|
||||
folly/io/async/Request.cpp
|
||||
folly/io/async/TimeoutManager.cpp
|
||||
folly/io/async/VirtualEventBase.cpp
|
||||
folly/lang/Exception.cpp
|
||||
folly/lang/UncaughtExceptions.cpp
|
||||
folly/memory/MallctlHelper.cpp
|
||||
folly/memory/ReentrantAllocator.cpp
|
||||
folly/portability/SysMembarrier.cpp
|
||||
folly/synchronization/AsymmetricThreadFence.cpp
|
||||
folly/synchronization/Hazptr.cpp
|
||||
folly/synchronization/WaitOptions.cpp
|
||||
folly/synchronization/detail/Sleeper.cpp
|
||||
folly/system/Pid.cpp)
|
||||
|
||||
target_compile_options(folly_futures
|
||||
PRIVATE
|
||||
-fexceptions
|
||||
-fno-omit-frame-pointer
|
||||
-frtti
|
||||
-Wno-sign-compare
|
||||
-Wno-unused-variable)
|
||||
|
||||
target_include_directories(folly_futures PUBLIC .)
|
||||
target_link_libraries(folly_futures glog double-conversion folly_runtime boost event fmt)
|
||||
|
||||
@@ -47,7 +47,6 @@ Pod::Spec.new do |s|
|
||||
s.dependency "DoubleConversion"
|
||||
s.dependency "fmt", "9.1.0"
|
||||
s.dependency "glog"
|
||||
s.dependency "RCT-Folly/Futures", folly_version
|
||||
s.dependency "hermes-engine"
|
||||
s.dependency "React-jsi"
|
||||
end
|
||||
|
||||
@@ -80,7 +80,7 @@ Pod::Spec.new do |spec|
|
||||
spec.libraries = "c++abi" # NOTE Apple-only: Keep c++abi here due to https://github.com/react-native-community/releases/issues/251
|
||||
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\" \"$(PODS_ROOT)/libevent/include/\"",
|
||||
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fmt/include\"",
|
||||
# In dynamic framework (use_frameworks!) mode, ignore the unused and undefined boost symbols when generating the library.
|
||||
"OTHER_LDFLAGS" => "\"-Wl,-U,_jump_fcontext\" \"-Wl,-U,_make_fcontext\""
|
||||
}
|
||||
@@ -109,43 +109,6 @@ Pod::Spec.new do |spec|
|
||||
'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/{CancellationToken,ExceptionString,ExceptionWrapper,ExceptionWrapper-inl,Executor,Singleton,SingletonThreadLocal,SharedMutex,Try}.{h,cpp}',
|
||||
'folly/chrono/Hardware.{h,cpp}',
|
||||
'folly/concurrency/*.{h,cpp}',
|
||||
'folly/detail/{AsyncTrace,Futex,Futex-inl,MemoryIdler,SingletonStackTrace,StaticSingletonManager,ThreadLocalDetail}.{h,cpp}',
|
||||
'folly/executors/*.{h,cpp}',
|
||||
'folly/executors/task_queue/*.{h,cpp}',
|
||||
'folly/executors/thread_factory/{NamedThreadFactory,ThreadFactory}.{h,cpp}',
|
||||
'folly/experimental/{ExecutionObserver,ReadMostlySharedPtr,SingleWriterFixedHashMap,TLRefCount}.{h,cpp}',
|
||||
'folly/experimental/**/*.h',
|
||||
'folly/experimental/coro/Coroutine.{h,cpp}',
|
||||
'folly/experimental/coro/Traits.{h,cpp}',
|
||||
'folly/fibers/*.{h,cpp}',
|
||||
'folly/futures/*.{h,cpp}',
|
||||
'folly/futures/detail/*.{h,cpp}',
|
||||
'folly/io/{Cursor,Cursor-inl,IOBuf,IOBufQueue}.{h,cpp}',
|
||||
'folly/io/async/{AtomicNotificationQueue,AtomicNotificationQueue-inl,AsyncTimeout,DelayedDestruction,DelayedDestructionBase,EventBase,EventBaseLocal,EventBaseManager,EventBaseAtomicNotificationQueue,EventBaseAtomicNotificationQueue-inl,EventBaseBackendBase,EventHandler,EventUtil,HHWheelTimer,HHWheelTimer-fwd,NotificationQueue,Request,TimeoutManager,VirtualEventBase}.{h,cpp}',
|
||||
'folly/lang/{SafeAssert,UncaughtExceptions}.{h,cpp}',
|
||||
'folly/memory/{MallctlHelper,ReentrantAllocator,SanitizeAddress}.{h,cpp}',
|
||||
'folly/portability/{GFlags,SysMembarrier,SysUio}.{h,cpp}',
|
||||
'folly/synchronization/*.{h,cpp}',
|
||||
'folly/synchronization/detail/*.{h,cpp}',
|
||||
'folly/system/{Pid,ThreadId,ThreadName,HardwareConcurrency}.{h,cpp}',
|
||||
'folly/tracing/{AsyncStack,AsyncStack-inl,StaticTracepoint}.{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
|
||||
|
||||
# Folly has issues when compiled with iOS 10 set as deployment target
|
||||
# See https://github.com/facebook/folly/issues/1470 for details
|
||||
spec.platforms = min_supported_versions
|
||||
|
||||
@@ -96,12 +96,6 @@ PODS:
|
||||
- DoubleConversion
|
||||
- fmt (= 9.1.0)
|
||||
- glog
|
||||
- RCT-Folly/Futures (2023.08.07.00):
|
||||
- boost
|
||||
- DoubleConversion
|
||||
- fmt (= 9.1.0)
|
||||
- glog
|
||||
- libevent
|
||||
- RCTRequired (1000.0.0)
|
||||
- RCTTypeSafety (1000.0.0):
|
||||
- FBLazyVector (= 1000.0.0)
|
||||
@@ -927,7 +921,6 @@ PODS:
|
||||
- glog
|
||||
- hermes-engine
|
||||
- RCT-Folly (= 2023.08.07.00)
|
||||
- RCT-Folly/Futures (= 2023.08.07.00)
|
||||
- React-cxxreact (= 1000.0.0)
|
||||
- React-jsi
|
||||
- React-jsiexecutor (= 1000.0.0)
|
||||
|
||||
Reference in New Issue
Block a user