Fix some issues with the React podspec for the Cxx bridge
Summary: Trying to fix the RN Travis CI tests Splitting off from https://github.com/facebook/react-native/pull/14100 Closes https://github.com/facebook/react-native/pull/14132 Reviewed By: ericvicenti Differential Revision: D5112077 Pulled By: javache fbshipit-source-id: cf030b927b0f28f2b494471498f1ddb2c0a5c1df
This commit is contained in:
parent
59e41b4485
commit
33e22486e9
|
@ -38,7 +38,7 @@ Pod::Spec.new do |s|
|
|||
s.requires_arc = true
|
||||
s.platform = :ios, "8.0"
|
||||
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
||||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-CustomComponents", "PATENTS"
|
||||
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs", "PATENTS"
|
||||
s.cocoapods_version = ">= 1.2.0"
|
||||
|
||||
s.subspec "Core" do |ss|
|
||||
|
@ -47,6 +47,7 @@ Pod::Spec.new do |s|
|
|||
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*", "React/DevSupport/*", "React/**/RCTTVView.*", "ReactCommon/yoga/*", "React/Cxx*/*", "React/Base/RCTBatchedBridge.mm", "React/Executors/*"
|
||||
ss.framework = "JavaScriptCore"
|
||||
ss.libraries = "stdc++"
|
||||
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
||||
end
|
||||
|
||||
s.subspec "BatchedBridge" do |ss|
|
||||
|
@ -56,7 +57,7 @@ Pod::Spec.new do |s|
|
|||
end
|
||||
|
||||
s.subspec "CxxBridge" do |ss|
|
||||
ss.dependency "Folly"
|
||||
ss.dependency "Folly", "2016.09.26.00"
|
||||
ss.dependency "React/Core"
|
||||
ss.dependency "React/cxxreact"
|
||||
ss.compiler_flags = folly_compiler_flags
|
||||
|
@ -90,7 +91,7 @@ Pod::Spec.new do |s|
|
|||
end
|
||||
|
||||
s.subspec "jschelpers" do |ss|
|
||||
ss.dependency "Folly"
|
||||
ss.dependency "Folly", "2016.09.26.00"
|
||||
ss.compiler_flags = folly_compiler_flags
|
||||
ss.source_files = "ReactCommon/jschelpers/*.{cpp,h}"
|
||||
ss.private_header_files = "ReactCommon/jschelpers/*.h"
|
||||
|
@ -101,10 +102,10 @@ Pod::Spec.new do |s|
|
|||
s.subspec "cxxreact" do |ss|
|
||||
ss.dependency "React/jschelpers"
|
||||
ss.dependency "boost"
|
||||
ss.dependency "Folly"
|
||||
ss.dependency "Folly", "2016.09.26.00"
|
||||
ss.compiler_flags = folly_compiler_flags
|
||||
ss.source_files = "ReactCommon/cxxreact/*.{cpp,h}"
|
||||
ss.exclude_files = "ReactCommon/cxxreact/JSCTracing.cpp"
|
||||
ss.exclude_files = "ReactCommon/cxxreact/{JSCTracing,SampleCxxModule}.*"
|
||||
ss.private_header_files = "ReactCommon/cxxreact/*.h"
|
||||
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\"" }
|
||||
end
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#import <React/RCTConvert.h>
|
||||
#import <React/RCTCxxModule.h>
|
||||
#import <React/RCTCxxUtils.h>
|
||||
#import <React/RCTDevLoadingView.h>
|
||||
#import <React/RCTDevSettings.h>
|
||||
#import <React/RCTDisplayLink.h>
|
||||
#import <React/RCTJavaScriptLoader.h>
|
||||
|
@ -47,6 +46,10 @@
|
|||
#import <React/RCTFBSystrace.h>
|
||||
#endif
|
||||
|
||||
#if RCT_DEV && __has_include("RCTDevLoadingView.h")
|
||||
#import "RCTDevLoadingView.h"
|
||||
#endif
|
||||
|
||||
@interface RCTCxxBridge : RCTBridge
|
||||
@end
|
||||
|
||||
|
@ -333,7 +336,7 @@ struct RCTInstanceCallback : public InstanceCallback {
|
|||
sourceCode = source;
|
||||
dispatch_group_leave(prepareBridge);
|
||||
} onProgress:^(RCTLoadingProgress *progressData) {
|
||||
#ifdef RCT_DEV
|
||||
#if RCT_DEV && __has_include("RCTDevLoadingView.h")
|
||||
RCTDevLoadingView *loadingView = [weakSelf moduleForClass:[RCTDevLoadingView class]];
|
||||
[loadingView updateProgress:progressData];
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,7 @@ set -e
|
|||
# Only set when not running in an Xcode context
|
||||
if [ -z "$ACTION" ] || [ -z "$BUILD_DIR" ]; then
|
||||
export CC="$(xcrun -find -sdk iphoneos cc) -arch armv7 -isysroot $(xcrun -sdk iphoneos --show-sdk-path)"
|
||||
export CXX="$CC"
|
||||
fi
|
||||
|
||||
./configure --host arm-apple-darwin
|
||||
|
@ -23,4 +24,13 @@ cat << EOF >> src/config.h
|
|||
#undef HAVE_SYS_SYSCALL_H
|
||||
#undef OS_MACOSX
|
||||
#endif
|
||||
|
||||
/* Special configuration for ucontext */
|
||||
#undef HAVE_UCONTEXT_H
|
||||
#undef PC_FROM_UCONTEXT
|
||||
#if defined(__x86_64__)
|
||||
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
|
||||
#elif defined(__i386__)
|
||||
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
|
||||
#endif
|
||||
EOF
|
||||
|
|
|
@ -17,12 +17,13 @@ Pod::Spec.new do |spec|
|
|||
'folly/Bits.cpp',
|
||||
'folly/Conv.cpp',
|
||||
'folly/Demangle.cpp',
|
||||
# 'folly/File.cpp',
|
||||
'folly/StringBase.cpp',
|
||||
'folly/Unicode.cpp',
|
||||
'folly/dynamic.cpp',
|
||||
'folly/json.cpp'
|
||||
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\" \"$(PODS_ROOT)/DoubleConversion\"" }
|
||||
|
||||
# Pinning to the same version as React.podspec.
|
||||
|
|
|
@ -6,13 +6,7 @@ Pod::Spec.new do |spec|
|
|||
spec.summary = 'Google logging module'
|
||||
spec.authors = 'Google'
|
||||
|
||||
spec.prepare_command = <<-CMD
|
||||
echo '#!/bin/sh' > ./ios-cc.sh
|
||||
echo 'exec "$(xcrun -find -sdk iphoneos cc)" -arch armv7 -isysroot "$(xcrun -sdk iphoneos --show-sdk-path)" "$@"' >> ./ios-cc.sh
|
||||
chmod 755 ./ios-cc.sh
|
||||
CC="`pwd`"/ios-cc.sh CXX="`pwd`"/ios-cc.sh ./configure --host arm-apple-darwin
|
||||
CMD
|
||||
|
||||
spec.prepare_command = File.read("../scripts/ios-configure-glog.sh")
|
||||
spec.source = { :git => 'https://github.com/google/glog.git',
|
||||
:tag => "v#{spec.version}" }
|
||||
spec.module_name = 'glog'
|
||||
|
@ -24,11 +18,13 @@ Pod::Spec.new do |spec|
|
|||
'src/symbolize.cc',
|
||||
'src/utilities.cc',
|
||||
'src/vlog_is_on.cc'
|
||||
spec.public_header_files = 'src/glog/*.h'
|
||||
spec.exclude_files = "src/windows/**/*"
|
||||
spec.public_header_files = "src/glog/*.h"
|
||||
spec.libraries = "stdc++"
|
||||
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||
"HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/src" }
|
||||
|
||||
# Pinning to the same version as React.podspec.
|
||||
spec.platform = :ios, '8.0'
|
||||
spec.platform = :ios, "8.0"
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue