Skip to content

Commit

Permalink
Support Swift Package Manager for gRPC-Core and gRPC-C++. (grpc#26169)
Browse files Browse the repository at this point in the history
  • Loading branch information
yulin-liang authored May 5, 2021
1 parent 9b87fb3 commit 88322f4
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,36 @@ let package = Package(
],
path: ".",
exclude: [
"src/core/ext/filters/load_reporting/",
"src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc",
"src/core/ext/filters/client_channel/xds/xds_channel.cc",
"src/core/ext/filters/load_reporting/",
"src/core/ext/transport/cronet/",
"src/core/ext/upb-generated/third_party/",
"src/core/ext/upb-generated/src/proto/grpc/auth/",
"src/core/ext/upbdefs-generated/envoy/config/rbac/",
"src/core/ext/upbdefs-generated/google/api/expr/",
"src/core/ext/upbdefs-generated/src/",
"src/core/ext/upbdefs-generated/third_party/",
"src/core/ext/upbdefs-generated/udpa/data/",
"src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h",
"src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc",
"src/core/lib/surface/init_unsecure.cc",
"src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h",
"src/core/lib/security/authorization/mock_cel/cel_expression.h",
"src/core/lib/security/authorization/mock_cel/evaluator_core.h",
"src/core/lib/security/authorization/mock_cel/flat_expr_builder.h",
"src/core/lib/security/authorization/mock_cel/statusor.h",
"src/core/lib/security/authorization/",
"src/core/plugin_registry/grpc_unsecure_plugin_registry.cc",
"third_party/re2/re2/testing/",
"third_party/re2/re2/fuzzing/",
"third_party/re2/util/benchmark.cc",
"third_party/re2/util/test.cc",
"third_party/re2/util/fuzz.cc",
"third_party/upb/upb/sink.c",
"third_party/upb/upb/json_decode.c",
"third_party/upb/upb/json_encode.c",
"third_party/upb/upb/handlers.h",
"third_party/upb/upb/sink.h",
"third_party/upb/upb/json_encode.h",
"third_party/upb/upb/json_decode.h",
"third_party/upb/upb/handlers-inl.h",
"third_party/upb/upb/handlers.c",
"third_party/upb/upb/bindings/",
"third_party/upb/upb/json/",
"third_party/upb/upb/pb/",
Expand All @@ -78,17 +86,24 @@ let package = Package(
"third_party/re2/re2/",
"third_party/re2/util/",
"third_party/upb/upb/",
"third_party/upb/third_party/wyhash/wyhash.h",
"third_party/xxhash/xxhash.h",
],
publicHeadersPath: "spm-core-include",
cSettings: [
.headerSearchPath("./"),
.headerSearchPath("include/"),
.headerSearchPath("third_party/re2/"),
.headerSearchPath("third_party/upb/"),
.headerSearchPath("third_party/xxhash/"),
.headerSearchPath("src/core/ext/upb-generated/"),
.headerSearchPath("src/core/ext/upbdefs-generated/"),
.define("GRPC_ARES", to: "0"),
.unsafeFlags(["-Wno-module-import-in-extern-c"]),
],
linkerSettings: [
.linkedFramework("CoreFoundation"),
.linkedLibrary("z"),
]
),
.target(
Expand All @@ -100,12 +115,18 @@ let package = Package(
path: ".",
exclude: [
"src/cpp/client/cronet_credentials.cc",
"src/cpp/client/channel_test_peer.cc",
"src/cpp/common/alts_util.cc",
"src/cpp/common/alts_context.cc",
"src/cpp/common/insecure_create_auth_context.cc",
"src/cpp/ext/",
"src/cpp/server/admin/",
"src/cpp/server/channelz/",
"src/cpp/server/csds/",
"src/cpp/server/load_reporter/",
"src/cpp/ext/",
"src/cpp/util/core_stats.cc",
"src/cpp/util/core_stats.h",
"src/cpp/util/error_details.cc",
],
sources: [
"src/cpp/",
Expand Down

0 comments on commit 88322f4

Please sign in to comment.