Skip to content

Commit a70625a

Browse files
Kudofacebook-github-bot
authored andcommitted
Upgrade folly to v2018.10.22.00 for iOS (#21976)
Summary: Fixes #20302 (For iOS) Note: ------ 1. Checked the changes did not break CocoaPods integration. 2. The change for glog copying header into exported/ is to prevent build break for folly. `folly/detail/Demangle.h` will try to use libstdc++'s demangle.h. Unfortunately, glog also has a demangle.h in source code. So I copy exported headers and only search headers in exported/ folder during build. Pull Request resolved: #21976 Reviewed By: hramos Differential Revision: D12818131 Pulled By: fkgozali fbshipit-source-id: b3c637d09d1b3adde0ea15c82eb56e28f846885b
1 parent a316dc6 commit a70625a

File tree

7 files changed

+164
-84
lines changed

7 files changed

+164
-84
lines changed

RNTester/Podfile.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PODS:
22
- boost-for-react-native (1.63.0)
33
- DoubleConversion (1.1.6)
4-
- Folly (2016.10.31.00):
4+
- Folly (2018.10.22.00):
55
- boost-for-react-native
66
- DoubleConversion
77
- glog
@@ -11,22 +11,22 @@ PODS:
1111
- React/Core (1000.0.0):
1212
- yoga (= 1000.0.0.React)
1313
- React/CxxBridge (1000.0.0):
14-
- Folly (= 2016.10.31.00)
14+
- Folly (= 2018.10.22.00)
1515
- React/Core
1616
- React/cxxreact
1717
- React/jsiexecutor
1818
- React/cxxreact (1000.0.0):
1919
- boost-for-react-native (= 1.63.0)
20-
- Folly (= 2016.10.31.00)
20+
- Folly (= 2018.10.22.00)
2121
- React/jsinspector
2222
- React/DevSupport (1000.0.0):
2323
- React/Core
2424
- React/RCTWebSocket
2525
- React/fishhook (1000.0.0)
2626
- React/jsi (1000.0.0):
27-
- Folly (= 2016.10.31.00)
27+
- Folly (= 2018.10.22.00)
2828
- React/jsiexecutor (1000.0.0):
29-
- Folly (= 2016.10.31.00)
29+
- Folly (= 2018.10.22.00)
3030
- React/cxxreact
3131
- React/jsi
3232
- React/jsinspector (1000.0.0)
@@ -104,9 +104,9 @@ EXTERNAL SOURCES:
104104
SPEC CHECKSUMS:
105105
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
106106
DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
107-
Folly: c89ac2d5c6ab169cd7397ef27485c44f35f742c7
108-
glog: 848747cb7af3aac910395f03626d7f63636e8ce6
109-
React: 8cb457c5485e7640094a7df86fcdb6d1e56e182c
107+
Folly: cd7933b82a5f7673ed71bafe631f44a575ae77ab
108+
glog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d
109+
React: 9b873b38b92ed8012d7cdf3b965477095ed364c4
110110
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
111111

112112
PODFILE CHECKSUM: 7af77fbc34af9646e8c6389e7e2c0b4663bb16d9

React.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ else
1818
end
1919

2020
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
21-
folly_version = '2016.10.31.00'
21+
folly_version = '2018.10.22.00'
2222

2323
Pod::Spec.new do |s|
2424
s.name = "React"

React/React.xcodeproj/project.pbxproj

+126-70
Large diffs are not rendered by default.

React/third-party.xcconfig

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

11-
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2016.10.31.00 $(SRCROOT)/../third-party/glog-0.3.5/src
11+
HEADER_SEARCH_PATHS = $(SRCROOT)/../third-party/boost_1_63_0 $(SRCROOT)/../third-party/folly-2018.10.22.00 $(SRCROOT)/../third-party/glog-0.3.5/src
1212
OTHER_CFLAGS = -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1

scripts/ios-configure-glog.sh

+9
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,12 @@ cat << EOF >> src/config.h
5555
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
5656
#endif
5757
EOF
58+
59+
# Prepare exported header include
60+
EXPORTED_INCLUDE_DIR="exported/glog"
61+
mkdir -p exported/glog
62+
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
63+
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
64+
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
65+
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
66+
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"

scripts/ios-install-third-party.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,4 @@ SCRIPTDIR=$(cd $(dirname "$0") && pwd)
6868
fetch_and_unpack glog-0.3.5.tar.gz https://github.com/google/glog/archive/v0.3.5.tar.gz 61067502c5f9769d111ea1ee3f74e6ddf0a5f9cc "\"$SCRIPTDIR/ios-configure-glog.sh\""
6969
fetch_and_unpack double-conversion-1.1.6.tar.gz https://github.com/google/double-conversion/archive/v1.1.6.tar.gz 1c7d88afde3aaeb97bb652776c627b49e132e8e0
7070
fetch_and_unpack boost_1_63_0.tar.gz https://github.com/react-native-community/boost-for-react-native/releases/download/v1.63.0-0/boost_1_63_0.tar.gz c3f57e1d22a995e608983effbb752b54b6eab741
71-
fetch_and_unpack folly-2016.10.31.00.tar.gz https://github.com/facebook/folly/archive/v2016.10.31.00.tar.gz fb8cdf8962d8c9d0c20a150b6ec3b75d1fa50696
71+
fetch_and_unpack folly-2018.10.22.00.tar.gz https://github.com/facebook/folly/archive/v2018.10.22.00.tar.gz f70a75bfeb394363d2049a846bba118ffb3b368a

third-party-podspecs/Folly.podspec

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'Folly'
3-
spec.version = '2016.10.31.00'
3+
spec.version = '2018.10.22.00'
44
spec.license = { :type => 'Apache License, Version 2.0' }
55
spec.homepage = 'https://github.com/facebook/folly'
66
spec.summary = 'An open-source C++ library developed and used at Facebook.'
@@ -12,18 +12,33 @@ Pod::Spec.new do |spec|
1212
spec.dependency 'DoubleConversion'
1313
spec.dependency 'glog'
1414
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
15-
spec.source_files = 'folly/Bits.cpp',
15+
spec.source_files = 'folly/String.cpp',
1616
'folly/Conv.cpp',
1717
'folly/Demangle.cpp',
18+
'folly/Format.cpp',
19+
'folly/ScopeGuard.cpp',
1820
'folly/StringBase.cpp',
1921
'folly/Unicode.cpp',
2022
'folly/dynamic.cpp',
2123
'folly/json.cpp',
24+
'folly/json_pointer.cpp',
25+
'folly/container/detail/F14Table.cpp',
26+
'folly/detail/Demangle.cpp',
27+
'folly/hash/SpookyHashV2.cpp',
28+
'folly/lang/Assume.cpp',
29+
'folly/lang/ColdClass.cpp',
2230
'folly/portability/BitsFunctexcept.cpp',
23-
'folly/detail/MallocImpl.cpp'
31+
'folly/memory/detail/MallocImpl.cpp'
2432
# workaround for https://github.com/facebook/react-native/issues/14326
2533
spec.preserve_paths = 'folly/*.h',
34+
'folly/container/*.h',
35+
'folly/container/detail/*.h',
2636
'folly/detail/*.h',
37+
'folly/functional/*.h',
38+
'folly/hash/*.h',
39+
'folly/lang/*.h',
40+
'folly/memory/*.h',
41+
'folly/memory/detail/*.h',
2742
'folly/portability/*.h'
2843
spec.libraries = "stdc++"
2944
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",

0 commit comments

Comments
 (0)