Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
9d83152b
Commit
9d83152b
authored
7 years ago
by
Craig Tiller
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #11134 from ctiller/build-wtf
Eliminate grpc_cc_libraries
parents
3e95a38b
f66de6e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
BUILD
+167
-149
167 additions, 149 deletions
BUILD
bazel/grpc_build_system.bzl
+9
-16
9 additions, 16 deletions
bazel/grpc_build_system.bzl
with
176 additions
and
165 deletions
BUILD
+
167
−
149
View file @
9d83152b
...
...
@@ -45,7 +45,6 @@ load(
"
//bazel:grpc_build_system.bzl
"
,
"
grpc_cc_library
"
,
"
grpc_proto_plugin
"
,
"
grpc_cc_libraries
"
,
"
grpc_generate_one_off_targets
"
,
)
...
...
@@ -65,48 +64,35 @@ grpc_cc_library(
],
)
grpc_cc_libraries
(
grpc_cc_library
(
name
=
"
grpc_unsecure
"
,
srcs
=
[
"
src/core/lib/surface/init.c
"
,
],
additional_dep_list
=
[
[
"
grpc_secure
"
,
"
grpc_resolver_dns_ares
"
,
"
grpc_lb_policy_grpclb_secure
"
,
"
grpc_transport_chttp2_client_secure
"
,
"
grpc_transport_chttp2_server_secure
"
,
],
[],
],
additional_src_list
=
[
[
"
src/core/plugin_registry/grpc_plugin_registry.c
"
,
],
[
"
src/core/lib/surface/init_unsecure.c
"
,
"
src/core/plugin_registry/grpc_unsecure_plugin_registry.c
"
,
],
"
src/core/lib/surface/init_unsecure.c
"
,
"
src/core/plugin_registry/grpc_unsecure_plugin_registry.c
"
,
],
language
=
"
c
"
,
name_list
=
[
"
grpc
"
,
"
grpc_unsecure
"
,
standalone
=
True
,
deps
=
[
"
grpc_common
"
,
],
)
grpc_cc_library
(
name
=
"
grpc
"
,
srcs
=
[
"
src/core/lib/surface/init.c
"
,
"
src/core/plugin_registry/grpc_plugin_registry.c
"
,
],
language
=
"
c
"
,
standalone
=
True
,
deps
=
[
"
census
"
,
"
grpc_base
"
,
"
grpc_deadline_filter
"
,
"
grpc_lb_policy_pick_first
"
,
"
grpc_lb_policy_round_robin
"
,
"
grpc_load_reporting
"
,
"
grpc_max_age_filter
"
,
"
grpc_message_size_filter
"
,
"
grpc_resolver_dns_native
"
,
"
grpc_resolver_sockaddr
"
,
"
grpc_transport_chttp2_client_insecure
"
,
"
grpc_transport_chttp2_server_insecure
"
,
"
grpc_common
"
,
"
grpc_lb_policy_grpclb_secure
"
,
"
grpc_resolver_dns_ares
"
,
"
grpc_secure
"
,
"
grpc_transport_chttp2_client_secure
"
,
"
grpc_transport_chttp2_server_secure
"
,
],
)
...
...
@@ -486,11 +472,10 @@ grpc_cc_library(
"
src/core/lib/iomgr/endpoint_pair_windows.c
"
,
"
src/core/lib/iomgr/error.c
"
,
"
src/core/lib/iomgr/ev_epoll1_linux.c
"
,
"
src/core/lib/iomgr/ev_epollsig_linux.c
"
,
"
src/core/lib/iomgr/ev_epollex_linux.c
"
,
"
src/core/lib/iomgr/is_epollexclusive_available.c
"
,
"
src/core/lib/iomgr/ev_epoll_thread_pool_linux.c
"
,
"
src/core/lib/iomgr/ev_epoll_limited_pollers_linux.c
"
,
"
src/core/lib/iomgr/ev_epoll_thread_pool_linux.c
"
,
"
src/core/lib/iomgr/ev_epollex_linux.c
"
,
"
src/core/lib/iomgr/ev_epollsig_linux.c
"
,
"
src/core/lib/iomgr/ev_poll_posix.c
"
,
"
src/core/lib/iomgr/ev_posix.c
"
,
"
src/core/lib/iomgr/exec_ctx.c
"
,
...
...
@@ -500,6 +485,7 @@ grpc_cc_library(
"
src/core/lib/iomgr/iomgr_posix.c
"
,
"
src/core/lib/iomgr/iomgr_uv.c
"
,
"
src/core/lib/iomgr/iomgr_windows.c
"
,
"
src/core/lib/iomgr/is_epollexclusive_available.c
"
,
"
src/core/lib/iomgr/load_file.c
"
,
"
src/core/lib/iomgr/lockfree_event.c
"
,
"
src/core/lib/iomgr/network_status_tracker.c
"
,
...
...
@@ -535,8 +521,8 @@ grpc_cc_library(
"
src/core/lib/iomgr/tcp_windows.c
"
,
"
src/core/lib/iomgr/time_averaged_stats.c
"
,
"
src/core/lib/iomgr/timer_generic.c
"
,
"
src/core/lib/iomgr/timer_manager.c
"
,
"
src/core/lib/iomgr/timer_heap.c
"
,
"
src/core/lib/iomgr/timer_manager.c
"
,
"
src/core/lib/iomgr/timer_uv.c
"
,
"
src/core/lib/iomgr/udp_server.c
"
,
"
src/core/lib/iomgr/unix_sockets_posix.c
"
,
...
...
@@ -612,12 +598,10 @@ grpc_cc_library(
"
src/core/lib/iomgr/error.h
"
,
"
src/core/lib/iomgr/error_internal.h
"
,
"
src/core/lib/iomgr/ev_epoll1_linux.h
"
,
"
src/core/lib/iomgr/ev_epollsig_linux.h
"
,
"
src/core/lib/iomgr/ev_epollex_linux.h
"
,
"
src/core/lib/iomgr/is_epollexclusive_available.h
"
,
"
src/core/lib/iomgr/sys_epoll_wrapper.h
"
,
"
src/core/lib/iomgr/ev_epoll_thread_pool_linux.h
"
,
"
src/core/lib/iomgr/ev_epoll_limited_pollers_linux.h
"
,
"
src/core/lib/iomgr/ev_epoll_thread_pool_linux.h
"
,
"
src/core/lib/iomgr/ev_epollex_linux.h
"
,
"
src/core/lib/iomgr/ev_epollsig_linux.h
"
,
"
src/core/lib/iomgr/ev_poll_posix.h
"
,
"
src/core/lib/iomgr/ev_posix.h
"
,
"
src/core/lib/iomgr/exec_ctx.h
"
,
...
...
@@ -626,6 +610,7 @@ grpc_cc_library(
"
src/core/lib/iomgr/iomgr.h
"
,
"
src/core/lib/iomgr/iomgr_internal.h
"
,
"
src/core/lib/iomgr/iomgr_posix.h
"
,
"
src/core/lib/iomgr/is_epollexclusive_available.h
"
,
"
src/core/lib/iomgr/load_file.h
"
,
"
src/core/lib/iomgr/lockfree_event.h
"
,
"
src/core/lib/iomgr/network_status_tracker.h
"
,
...
...
@@ -647,6 +632,7 @@ grpc_cc_library(
"
src/core/lib/iomgr/socket_utils.h
"
,
"
src/core/lib/iomgr/socket_utils_posix.h
"
,
"
src/core/lib/iomgr/socket_windows.h
"
,
"
src/core/lib/iomgr/sys_epoll_wrapper.h
"
,
"
src/core/lib/iomgr/tcp_client.h
"
,
"
src/core/lib/iomgr/tcp_client_posix.h
"
,
"
src/core/lib/iomgr/tcp_posix.h
"
,
...
...
@@ -657,8 +643,8 @@ grpc_cc_library(
"
src/core/lib/iomgr/time_averaged_stats.h
"
,
"
src/core/lib/iomgr/timer.h
"
,
"
src/core/lib/iomgr/timer_generic.h
"
,
"
src/core/lib/iomgr/timer_manager.h
"
,
"
src/core/lib/iomgr/timer_heap.h
"
,
"
src/core/lib/iomgr/timer_manager.h
"
,
"
src/core/lib/iomgr/timer_uv.h
"
,
"
src/core/lib/iomgr/udp_server.h
"
,
"
src/core/lib/iomgr/unix_sockets_posix.h
"
,
...
...
@@ -730,12 +716,31 @@ grpc_cc_library(
grpc_cc_library
(
name
=
"
grpc_base
"
,
language
=
"
c++
"
,
srcs
=
[
"
src/core/lib/surface/lame_client.cc
"
,
],
language
=
"
c++
"
,
deps
=
[
"
grpc_base_c
"
,
],
)
grpc_cc_library
(
name
=
"
grpc_common
"
,
deps
=
[
"
grpc_base
"
,
# standard plugins
"
census
"
,
"
grpc_deadline_filter
"
,
"
grpc_lb_policy_pick_first
"
,
"
grpc_lb_policy_round_robin
"
,
"
grpc_load_reporting
"
,
"
grpc_max_age_filter
"
,
"
grpc_message_size_filter
"
,
"
grpc_resolver_dns_native
"
,
"
grpc_resolver_sockaddr
"
,
"
grpc_transport_chttp2_client_insecure
"
,
"
grpc_transport_chttp2_server_insecure
"
,
]
)
...
...
@@ -1277,111 +1282,124 @@ grpc_cc_library(
],
)
grpc_cc_libraries
(
srcs
=
[
"
src/cpp/client/channel_cc.cc
"
,
"
src/cpp/client/client_context.cc
"
,
"
src/cpp/client/create_channel.cc
"
,
"
src/cpp/client/create_channel_internal.cc
"
,
"
src/cpp/client/create_channel_posix.cc
"
,
"
src/cpp/client/credentials_cc.cc
"
,
"
src/cpp/client/generic_stub.cc
"
,
"
src/cpp/common/channel_arguments.cc
"
,
"
src/cpp/common/channel_filter.cc
"
,
"
src/cpp/common/completion_queue_cc.cc
"
,
"
src/cpp/common/core_codegen.cc
"
,
"
src/cpp/common/resource_quota_cc.cc
"
,
"
src/cpp/common/rpc_method.cc
"
,
"
src/cpp/common/version_cc.cc
"
,
"
src/cpp/server/async_generic_service.cc
"
,
"
src/cpp/server/channel_argument_option.cc
"
,
"
src/cpp/server/create_default_thread_pool.cc
"
,
"
src/cpp/server/dynamic_thread_pool.cc
"
,
"
src/cpp/server/health/default_health_check_service.cc
"
,
"
src/cpp/server/health/health.pb.c
"
,
"
src/cpp/server/health/health_check_service.cc
"
,
"
src/cpp/server/health/health_check_service_server_builder_option.cc
"
,
"
src/cpp/server/server_builder.cc
"
,
"
src/cpp/server/server_cc.cc
"
,
"
src/cpp/server/server_context.cc
"
,
"
src/cpp/server/server_credentials.cc
"
,
"
src/cpp/server/server_posix.cc
"
,
"
src/cpp/thread_manager/thread_manager.cc
"
,
"
src/cpp/util/byte_buffer_cc.cc
"
,
"
src/cpp/util/slice_cc.cc
"
,
"
src/cpp/util/status.cc
"
,
"
src/cpp/util/string_ref.cc
"
,
"
src/cpp/util/time_cc.cc
"
,
],
hdrs
=
[
"
src/cpp/client/create_channel_internal.h
"
,
"
src/cpp/common/channel_filter.h
"
,
"
src/cpp/server/dynamic_thread_pool.h
"
,
"
src/cpp/server/health/default_health_check_service.h
"
,
"
src/cpp/server/health/health.pb.h
"
,
"
src/cpp/server/thread_pool_interface.h
"
,
"
src/cpp/thread_manager/thread_manager.h
"
,
],
additional_dep_list
=
[
[
"
grpc
"
],
[
"
grpc_unsecure
"
],
],
# TODO(ctiller): layer grpc atop grpc_unsecure, layer grpc++ atop grpc++_unsecure
GRPCXX_SRCS
=
[
"
src/cpp/client/channel_cc.cc
"
,
"
src/cpp/client/client_context.cc
"
,
"
src/cpp/client/create_channel.cc
"
,
"
src/cpp/client/create_channel_internal.cc
"
,
"
src/cpp/client/create_channel_posix.cc
"
,
"
src/cpp/client/credentials_cc.cc
"
,
"
src/cpp/client/generic_stub.cc
"
,
"
src/cpp/common/channel_arguments.cc
"
,
"
src/cpp/common/channel_filter.cc
"
,
"
src/cpp/common/completion_queue_cc.cc
"
,
"
src/cpp/common/core_codegen.cc
"
,
"
src/cpp/common/resource_quota_cc.cc
"
,
"
src/cpp/common/rpc_method.cc
"
,
"
src/cpp/common/version_cc.cc
"
,
"
src/cpp/server/async_generic_service.cc
"
,
"
src/cpp/server/channel_argument_option.cc
"
,
"
src/cpp/server/create_default_thread_pool.cc
"
,
"
src/cpp/server/dynamic_thread_pool.cc
"
,
"
src/cpp/server/health/default_health_check_service.cc
"
,
"
src/cpp/server/health/health.pb.c
"
,
"
src/cpp/server/health/health_check_service.cc
"
,
"
src/cpp/server/health/health_check_service_server_builder_option.cc
"
,
"
src/cpp/server/server_builder.cc
"
,
"
src/cpp/server/server_cc.cc
"
,
"
src/cpp/server/server_context.cc
"
,
"
src/cpp/server/server_credentials.cc
"
,
"
src/cpp/server/server_posix.cc
"
,
"
src/cpp/thread_manager/thread_manager.cc
"
,
"
src/cpp/util/byte_buffer_cc.cc
"
,
"
src/cpp/util/slice_cc.cc
"
,
"
src/cpp/util/status.cc
"
,
"
src/cpp/util/string_ref.cc
"
,
"
src/cpp/util/time_cc.cc
"
,
]
GRPCXX_HDRS
=
[
"
src/cpp/client/create_channel_internal.h
"
,
"
src/cpp/common/channel_filter.h
"
,
"
src/cpp/server/dynamic_thread_pool.h
"
,
"
src/cpp/server/health/default_health_check_service.h
"
,
"
src/cpp/server/health/health.pb.h
"
,
"
src/cpp/server/thread_pool_interface.h
"
,
"
src/cpp/thread_manager/thread_manager.h
"
,
]
GRPCXX_PUBLIC_HDRS
=
[
"
include/grpc++/alarm.h
"
,
"
include/grpc++/channel.h
"
,
"
include/grpc++/client_context.h
"
,
"
include/grpc++/completion_queue.h
"
,
"
include/grpc++/create_channel.h
"
,
"
include/grpc++/create_channel_posix.h
"
,
"
include/grpc++/ext/health_check_service_server_builder_option.h
"
,
"
include/grpc++/generic/async_generic_service.h
"
,
"
include/grpc++/generic/generic_stub.h
"
,
"
include/grpc++/grpc++.h
"
,
"
include/grpc++/health_check_service_interface.h
"
,
"
include/grpc++/impl/call.h
"
,
"
include/grpc++/impl/channel_argument_option.h
"
,
"
include/grpc++/impl/client_unary_call.h
"
,
"
include/grpc++/impl/codegen/core_codegen.h
"
,
"
include/grpc++/impl/grpc_library.h
"
,
"
include/grpc++/impl/method_handler_impl.h
"
,
"
include/grpc++/impl/rpc_method.h
"
,
"
include/grpc++/impl/rpc_service_method.h
"
,
"
include/grpc++/impl/serialization_traits.h
"
,
"
include/grpc++/impl/server_builder_option.h
"
,
"
include/grpc++/impl/server_builder_plugin.h
"
,
"
include/grpc++/impl/server_initializer.h
"
,
"
include/grpc++/impl/service_type.h
"
,
"
include/grpc++/impl/sync_cxx11.h
"
,
"
include/grpc++/impl/sync_no_cxx11.h
"
,
"
include/grpc++/resource_quota.h
"
,
"
include/grpc++/security/auth_context.h
"
,
"
include/grpc++/security/auth_metadata_processor.h
"
,
"
include/grpc++/security/credentials.h
"
,
"
include/grpc++/security/server_credentials.h
"
,
"
include/grpc++/server.h
"
,
"
include/grpc++/server_builder.h
"
,
"
include/grpc++/server_context.h
"
,
"
include/grpc++/server_posix.h
"
,
"
include/grpc++/support/async_stream.h
"
,
"
include/grpc++/support/async_unary_call.h
"
,
"
include/grpc++/support/byte_buffer.h
"
,
"
include/grpc++/support/channel_arguments.h
"
,
"
include/grpc++/support/config.h
"
,
"
include/grpc++/support/slice.h
"
,
"
include/grpc++/support/status.h
"
,
"
include/grpc++/support/status_code_enum.h
"
,
"
include/grpc++/support/string_ref.h
"
,
"
include/grpc++/support/stub_options.h
"
,
"
include/grpc++/support/sync_stream.h
"
,
"
include/grpc++/support/time.h
"
,
]
grpc_cc_library
(
name
=
"
grpc++_base
"
,
hdrs
=
GRPCXX_HDRS
,
srcs
=
GRPCXX_SRCS
,
public_hdrs
=
GRPCXX_PUBLIC_HDRS
,
language
=
"
c++
"
,
name_list
=
[
"
grpc++_base
"
,
"
grpc++_base_unsecure
"
,
],
public_hdrs
=
[
"
include/grpc++/alarm.h
"
,
"
include/grpc++/channel.h
"
,
"
include/grpc++/client_context.h
"
,
"
include/grpc++/completion_queue.h
"
,
"
include/grpc++/create_channel.h
"
,
"
include/grpc++/create_channel_posix.h
"
,
"
include/grpc++/ext/health_check_service_server_builder_option.h
"
,
"
include/grpc++/generic/async_generic_service.h
"
,
"
include/grpc++/generic/generic_stub.h
"
,
"
include/grpc++/grpc++.h
"
,
"
include/grpc++/health_check_service_interface.h
"
,
"
include/grpc++/impl/call.h
"
,
"
include/grpc++/impl/channel_argument_option.h
"
,
"
include/grpc++/impl/client_unary_call.h
"
,
"
include/grpc++/impl/codegen/core_codegen.h
"
,
"
include/grpc++/impl/grpc_library.h
"
,
"
include/grpc++/impl/method_handler_impl.h
"
,
"
include/grpc++/impl/rpc_method.h
"
,
"
include/grpc++/impl/rpc_service_method.h
"
,
"
include/grpc++/impl/serialization_traits.h
"
,
"
include/grpc++/impl/server_builder_option.h
"
,
"
include/grpc++/impl/server_builder_plugin.h
"
,
"
include/grpc++/impl/server_initializer.h
"
,
"
include/grpc++/impl/service_type.h
"
,
"
include/grpc++/impl/sync_cxx11.h
"
,
"
include/grpc++/impl/sync_no_cxx11.h
"
,
"
include/grpc++/resource_quota.h
"
,
"
include/grpc++/security/auth_context.h
"
,
"
include/grpc++/security/auth_metadata_processor.h
"
,
"
include/grpc++/security/credentials.h
"
,
"
include/grpc++/security/server_credentials.h
"
,
"
include/grpc++/server.h
"
,
"
include/grpc++/server_builder.h
"
,
"
include/grpc++/server_context.h
"
,
"
include/grpc++/server_posix.h
"
,
"
include/grpc++/support/async_stream.h
"
,
"
include/grpc++/support/async_unary_call.h
"
,
"
include/grpc++/support/byte_buffer.h
"
,
"
include/grpc++/support/channel_arguments.h
"
,
"
include/grpc++/support/config.h
"
,
"
include/grpc++/support/slice.h
"
,
"
include/grpc++/support/status.h
"
,
"
include/grpc++/support/status_code_enum.h
"
,
"
include/grpc++/support/string_ref.h
"
,
"
include/grpc++/support/stub_options.h
"
,
"
include/grpc++/support/sync_stream.h
"
,
"
include/grpc++/support/time.h
"
,
deps
=
[
"
grpc++_codegen_base
"
,
"
grpc
"
,
],
)
grpc_cc_library
(
name
=
"
grpc++_base_unsecure
"
,
hdrs
=
GRPCXX_HDRS
,
srcs
=
GRPCXX_SRCS
,
public_hdrs
=
GRPCXX_PUBLIC_HDRS
,
language
=
"
c++
"
,
deps
=
[
"
grpc++_codegen_base
"
,
"
grpc_unsecure
"
,
],
)
...
...
This diff is collapsed.
Click to expand it.
bazel/grpc_build_system.bzl
+
9
−
16
View file @
9d83152b
...
...
@@ -32,6 +32,11 @@
# the BUILD file for gRPC. It contains the mapping for the template system we
# use to generate other platform's build system files.
#
# Please consider that there should be a high bar for additions and changes to
# this file.
# Each rule listed must be re-written for Google's internal build system, and
# each change must be ported from one to the other.
#
def
grpc_cc_library
(
name
,
srcs
=
[],
public_hdrs
=
[],
hdrs
=
[],
external_deps
=
[],
deps
=
[],
standalone
=
False
,
...
...
@@ -53,22 +58,6 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
]
)
def
grpc_cc_libraries
(
name_list
,
additional_src_list
=
[],
additional_dep_list
=
[],
srcs
=
[],
public_hdrs
=
[],
hdrs
=
[],
external_deps
=
[],
deps
=
[],
standalone
=
False
,
language
=
"
C++
"
):
names
=
len
(
name_list
)
asl
=
additional_src_list
+
[[]]
*
(
names
-
len
(
additional_src_list
))
adl
=
additional_dep_list
+
[[]]
*
(
names
-
len
(
additional_dep_list
))
for
i
in
range
(
names
):
grpc_cc_library
(
name
=
name_list
[
i
],
srcs
=
srcs
+
asl
[
i
],
hdrs
=
hdrs
,
public_hdrs
=
public_hdrs
,
deps
=
deps
+
adl
[
i
],
external_deps
=
external_deps
,
standalone
=
standalone
,
language
=
language
)
def
grpc_proto_plugin
(
name
,
srcs
=
[],
deps
=
[]):
native
.
cc_binary
(
name
=
name
,
...
...
@@ -91,12 +80,16 @@ def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = None,
)
def
grpc_cc_test
(
name
,
srcs
=
[],
deps
=
[],
external_deps
=
[],
args
=
[],
data
=
[],
language
=
"
C++
"
):
copts
=
[]
if
language
.
upper
()
==
"
C
"
:
copts
=
[
"
-std=c99
"
]
native
.
cc_test
(
name
=
name
,
srcs
=
srcs
,
args
=
args
,
data
=
data
,
deps
=
deps
+
[
"
//external:
"
+
dep
for
dep
in
external_deps
],
copts
=
copts
,
linkopts
=
[
"
-pthread
"
],
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment