Skip to content

Commit 2dc0cac

Browse files
authored
Fix fuzzer build under Xcode 10 (#1934)
* LibFuzzer uses thread_local, which isn't available until iOS 9.0 This fixes builds under Xcode 10, where the linker is finally enforcing that running this binary on iOS wouldn't work. * Generated project changes
1 parent b661695 commit 2dc0cac

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

Firestore/Example/Firestore.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@
15061506
"${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework",
15071507
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
15081508
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
1509-
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
1509+
"${BUILT_PRODUCTS_DIR}/Protobuf-iOS8.0/Protobuf.framework",
15101510
"${BUILT_PRODUCTS_DIR}/gRPC/GRPCClient.framework",
15111511
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
15121512
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",
@@ -1618,7 +1618,7 @@
16181618
);
16191619
inputPaths = (
16201620
"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh",
1621-
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
1621+
"${BUILT_PRODUCTS_DIR}/Protobuf-iOS9.0/Protobuf.framework",
16221622
"${BUILT_PRODUCTS_DIR}/LibFuzzer/LibFuzzer.framework",
16231623
);
16241624
name = "[CP] Embed Pods Frameworks";
@@ -1753,7 +1753,7 @@
17531753
"${BUILT_PRODUCTS_DIR}/BoringSSL/openssl.framework",
17541754
"${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework",
17551755
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
1756-
"${BUILT_PRODUCTS_DIR}/Protobuf/Protobuf.framework",
1756+
"${BUILT_PRODUCTS_DIR}/Protobuf-iOS8.0/Protobuf.framework",
17571757
"${BUILT_PRODUCTS_DIR}/gRPC/GRPCClient.framework",
17581758
"${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework",
17591759
"${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework",

Firestore/Example/LibFuzzer.podspec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ Pod::Spec.new do |s|
2828
s.license = { :type => 'BSD-Like' }
2929
s.authors = 'LLVM Team'
3030

31+
# LibFuzzer uses thread_local which does not appear to be supported before
32+
# iOS 9.
33+
s.ios.deployment_target = '9.0'
34+
3135
# Check out only libFuzzer folder.
3236
s.source = {
3337
:svn => 'https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer'

Firestore/Example/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ target 'Firestore_Example_iOS' do
4949

5050
target 'Firestore_FuzzTests_iOS' do
5151
inherit! :search_paths
52+
platform :ios, '9.0'
5253

5354
pod 'LibFuzzer', :podspec => 'LibFuzzer.podspec'
5455
pod '!ProtoCompiler'

0 commit comments

Comments
 (0)