Skip to content

Commit ab606e0

Browse files
authored
Upgrade cmake build to grpc 162 (#12417)
1 parent 4c138e6 commit ab606e0

File tree

93 files changed

+68350
-63997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+68350
-63997
lines changed

.github/workflows/firestore.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ jobs:
328328

329329
strategy:
330330
matrix:
331-
target: [iOS, tvOS, macOS]
331+
target: [iOS, macOS, tvOS]
332332

333333
steps:
334334
- uses: actions/checkout@v4

CMakeLists.txt

+4-11
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ unset(RANDOM_FILE CACHE)
160160
set(CARES_INSTALL OFF CACHE BOOL "Disabled")
161161

162162
set(protobuf_BUILD_TESTS OFF CACHE BOOL "Disabled")
163+
# See https://github.com/protocolbuffers/protobuf/issues/12185#issuecomment-1887892723
164+
set(protobuf_INSTALL OFF)
165+
set(utf8_range_ENABLE_INSTALL OFF)
166+
163167
if(IOS OR ANDROID)
164168
# C-Ares includes a number of example binaries (e.g. `ahost`) that fail to
165169
# build when compiling for non-host targets.
@@ -207,17 +211,6 @@ set(PROTOBUF_ROOT_DIR ${FIREBASE_EXTERNAL_SOURCE_DIR}/protobuf)
207211

208212
add_external_subdirectory(grpc)
209213

210-
211-
# Fix up targets included by gRPC
212-
if(CXX_CLANG)
213-
target_compile_options(
214-
absl_time_zone PRIVATE
215-
-Wno-unused-template
216-
-Wno-shadow
217-
-Wno-tautological-type-limit-compare
218-
)
219-
endif()
220-
221214
# Fix up targets included by boringssl (ver: b9232f9e27e5668bc0414879dcdedb2a59ea75f2)
222215
# We might be able to remove this with newer versions.
223216
if(CXX_CLANG)

Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Example_iOS.xcscheme

+9-13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "6003F589195388D20070C39A"
34+
BuildableName = "Firestore_Example_iOS.app"
35+
BlueprintName = "Firestore_Example_iOS"
36+
ReferencedContainer = "container:Firestore.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -59,17 +68,6 @@
5968
</BuildableReference>
6069
</TestableReference>
6170
</Testables>
62-
<MacroExpansion>
63-
<BuildableReference
64-
BuildableIdentifier = "primary"
65-
BlueprintIdentifier = "6003F589195388D20070C39A"
66-
BuildableName = "Firestore_Example_iOS.app"
67-
BlueprintName = "Firestore_Example_iOS"
68-
ReferencedContainer = "container:Firestore.xcodeproj">
69-
</BuildableReference>
70-
</MacroExpansion>
71-
<AdditionalOptions>
72-
</AdditionalOptions>
7371
</TestAction>
7472
<LaunchAction
7573
buildConfiguration = "Debug"
@@ -91,8 +89,6 @@
9189
ReferencedContainer = "container:Firestore.xcodeproj">
9290
</BuildableReference>
9391
</BuildableProductRunnable>
94-
<AdditionalOptions>
95-
</AdditionalOptions>
9692
</LaunchAction>
9793
<ProfileAction
9894
buildConfiguration = "Release"

Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Example_macOS.xcscheme

+9-13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "DAFF0CF421E64AC30062958F"
34+
BuildableName = "Firestore_Example_macOS.app"
35+
BlueprintName = "Firestore_Example_macOS"
36+
ReferencedContainer = "container:Firestore.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -49,17 +58,6 @@
4958
</BuildableReference>
5059
</TestableReference>
5160
</Testables>
52-
<MacroExpansion>
53-
<BuildableReference
54-
BuildableIdentifier = "primary"
55-
BlueprintIdentifier = "DAFF0CF421E64AC30062958F"
56-
BuildableName = "Firestore_Example_macOS.app"
57-
BlueprintName = "Firestore_Example_macOS"
58-
ReferencedContainer = "container:Firestore.xcodeproj">
59-
</BuildableReference>
60-
</MacroExpansion>
61-
<AdditionalOptions>
62-
</AdditionalOptions>
6361
</TestAction>
6462
<LaunchAction
6563
buildConfiguration = "Debug"
@@ -81,8 +79,6 @@
8179
ReferencedContainer = "container:Firestore.xcodeproj">
8280
</BuildableReference>
8381
</BuildableProductRunnable>
84-
<AdditionalOptions>
85-
</AdditionalOptions>
8682
</LaunchAction>
8783
<ProfileAction
8884
buildConfiguration = "Release"

Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_Example_tvOS.xcscheme

+9-13
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<MacroExpansion>
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "54AA338E224BF935006CE580"
34+
BuildableName = "Firestore_Example_tvOS.app"
35+
BlueprintName = "Firestore_Example_tvOS"
36+
ReferencedContainer = "container:Firestore.xcodeproj">
37+
</BuildableReference>
38+
</MacroExpansion>
3039
<Testables>
3140
<TestableReference
3241
skipped = "NO">
@@ -49,17 +58,6 @@
4958
</BuildableReference>
5059
</TestableReference>
5160
</Testables>
52-
<MacroExpansion>
53-
<BuildableReference
54-
BuildableIdentifier = "primary"
55-
BlueprintIdentifier = "54AA338E224BF935006CE580"
56-
BuildableName = "Firestore_Example_tvOS.app"
57-
BlueprintName = "Firestore_Example_tvOS"
58-
ReferencedContainer = "container:Firestore.xcodeproj">
59-
</BuildableReference>
60-
</MacroExpansion>
61-
<AdditionalOptions>
62-
</AdditionalOptions>
6361
</TestAction>
6462
<LaunchAction
6563
buildConfiguration = "Debug"
@@ -81,8 +79,6 @@
8179
ReferencedContainer = "container:Firestore.xcodeproj">
8280
</BuildableReference>
8381
</BuildableProductRunnable>
84-
<AdditionalOptions>
85-
</AdditionalOptions>
8682
</LaunchAction>
8783
<ProfileAction
8884
buildConfiguration = "Release"

Firestore/Example/Podfile

+6
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ if is_platform(:ios)
9999

100100
configure_local_pods()
101101

102+
pod 'abseil', '~> 1.20240116.1'
103+
102104
target 'Firestore_Tests_iOS' do
103105
inherit! :search_paths
104106

@@ -141,6 +143,8 @@ if is_platform(:osx)
141143

142144
configure_local_pods()
143145

146+
pod 'abseil', '~> 1.20240116.1'
147+
144148
target 'Firestore_Tests_macOS' do
145149
inherit! :search_paths
146150

@@ -170,6 +174,8 @@ if is_platform(:tvos)
170174

171175
configure_local_pods()
172176

177+
pod 'abseil', '~> 1.20240116.1'
178+
173179
target 'Firestore_Tests_tvOS' do
174180
inherit! :search_paths
175181

Firestore/Example/ProtobufCpp.podspec

+11-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
Pod::Spec.new do |s|
1919
s.name = 'ProtobufCpp'
20-
s.version = '3.11.4'
20+
s.version = '25.0'
2121
s.summary = 'Protocol Buffers v.3 runtime library for C++.'
2222
s.homepage = 'https://github.com/protocolbuffers/protobuf'
2323
s.license = '3-Clause BSD License'
@@ -33,7 +33,9 @@ Pod::Spec.new do |s|
3333
s.osx.deployment_target = '10.13'
3434
s.tvos.deployment_target = '12.0'
3535

36-
s.source_files = 'src/**/*.{h,cc,inc}'
36+
s.source_files = 'src/**/*.{h,cc,inc}',
37+
# utf8_range is needed too, to avoid build errors.
38+
'third_party/utf8_range/*.{h,cc,inc}'
3739
s.exclude_files = # skip test files. (Yes, the test files are intermixed with
3840
# the source. No there doesn't seem to be a common/simple
3941
# pattern we could use to exclude them; 'test' appears in
@@ -46,20 +48,26 @@ Pod::Spec.new do |s|
4648
'src/**/*[^y]test*.*',
4749
'src/**/testing/**',
4850
'src/**/mock*',
51+
'third_party/utf8_range/*_test.{h,cc,inc}',
52+
# skip benchmark code that failed to compile.
53+
'src/**/map_probe_benchmark.cc',
4954
# skip the javascript handling code.
5055
'src/**/js/**',
5156
# skip the protoc compiler
5257
'src/google/protobuf/compiler/**/*'
5358

5459
s.header_mappings_dir = 'src/'
5560

61+
s.dependency 'abseil', '~> 1.20240116.1'
62+
5663
# Set a CPP symbol so the code knows to use framework imports.
5764
s.pod_target_xcconfig = {
65+
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
5866
'GCC_PREPROCESSOR_DEFINITIONS' =>
5967
'$(inherited) ' +
6068
'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
6169
'HAVE_PTHREAD=1',
62-
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src"',
70+
'HEADER_SEARCH_PATHS' => '"${PODS_ROOT}/ProtobufCpp/src" "${PODS_ROOT}/ProtobufCpp/third_party/utf8_range"',
6371

6472
# Cocoapods flattens header imports, leading to much anguish. The
6573
# following two statements work around this.

0 commit comments

Comments
 (0)