forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRCT-Folly.podspec
More file actions
133 lines (123 loc) · 6.33 KB
/
RCT-Folly.podspec
File metadata and controls
133 lines (123 loc) · 6.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
folly_config = get_folly_config()
folly_config_file = folly_config[:config_file]
folly_release_version = folly_config[:version]
folly_git_url = folly_config[:git]
Pod::Spec.new do |spec|
spec.name = 'RCT-Folly'
# Patched to v2 to address https://github.com/react-native-community/releases/issues/251
spec.version = folly_release_version
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 => folly_git_url,
:tag => "v#{folly_release_version}" }
spec.module_name = 'folly'
spec.prepare_command = "echo '#{folly_config_file.join("\n")}' > folly/folly-config.h"
spec.header_mappings_dir = '.'
spec.dependency "boost"
spec.dependency "DoubleConversion"
spec.dependency "glog"
spec.dependency "fast_float", "8.0.0"
spec.dependency "fmt", "12.1.0"
spec.compiler_flags = '-Wno-documentation -faligned-new'
spec.source_files = 'folly/String.cpp',
'folly/Conv.cpp',
'folly/Demangle.cpp',
'folly/FileUtil.cpp',
'folly/Format.cpp',
'folly/lang/SafeAssert.cpp',
'folly/lang/ToAscii.cpp',
'folly/ScopeGuard.cpp',
'folly/Unicode.cpp',
'folly/json/dynamic.cpp',
'folly/json/json.cpp',
'folly/json/json_pointer.cpp',
'folly/container/detail/F14Table.cpp',
'folly/detail/Demangle.cpp',
'folly/detail/FileUtilDetail.cpp',
'folly/detail/SplitStringSimd.cpp',
'folly/detail/StaticSingletonManager.cpp',
'folly/detail/UniqueInstance.cpp',
'folly/hash/SpookyHashV2.cpp',
'folly/lang/CString.cpp',
'folly/lang/Exception.cpp',
'folly/memory/ReentrantAllocator.cpp',
'folly/memory/detail/MallocImpl.cpp',
'folly/memory/SanitizeLeak.cpp',
'folly/net/NetOps.cpp',
'folly/portability/SysUio.cpp',
'folly/synchronization/SanitizeThread.cpp',
'folly/system/AtFork.cpp',
'folly/system/ThreadId.cpp',
'folly/*.h',
'folly/algorithm/simd/*.h',
'folly/algorithm/simd/detail/*.h',
'folly/chrono/*.h',
'folly/container/*.h',
'folly/container/detail/*.h',
'folly/detail/*.h',
'folly/functional/*.h',
'folly/hash/*.h',
'folly/json/*.h',
'folly/lang/*.h',
'folly/memory/*.h',
'folly/memory/detail/*.h',
'folly/net/*.h',
'folly/net/detail/*.h',
'folly/portability/*.h',
'folly/system/*.h',
# workaround for https://github.com/facebook/react-native/issues/14326
spec.preserve_paths = 'folly/*.h',
'folly/algorithm/simd/*.h',
'folly/algorithm/simd/detail/*.h',
'folly/chrono/*.h',
'folly/container/*.h',
'folly/container/detail/*.h',
'folly/detail/*.h',
'folly/functional/*.h',
'folly/hash/*.h',
'folly/json/*.h',
'folly/lang/*.h',
'folly/memory/*.h',
'folly/memory/detail/*.h',
'folly/net/*.h',
'folly/net/detail/*.h',
'folly/portability/*.h',
'folly/system/*.h',
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",
"DEFINES_MODULE" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/fast_float/include\" \"$(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\"",
"GCC_WARN_INHIBIT_ALL_WARNINGS" => "YES" # Disable warnings because we don't control this library
}
# 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\"" }
spec.default_subspec = 'Default'
spec.resource_bundles = {'RCT-Folly_privacy' => 'RCT-Folly/PrivacyInfo.xcprivacy'}
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/concurrency/CacheLocality.h',
'folly/synchronization/*.h',
'folly/system/ThreadId.h'
fabric.preserve_paths = 'folly/concurrency/CacheLocality.h',
'folly/synchronization/*.h',
'folly/system/ThreadId.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
end