From 31d11dbfb8db0fc39da64be9c094e2900e9aedfb Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 09:29:46 +0200 Subject: [PATCH 01/23] Starting this from scratch -) Basic workspace -) Basic BUILD file with macros --- .gitignore | 7 + BUILD | 1958 +++----------------------------------- WORKSPACE | 42 + grpc-build-system.bzl | 31 + templates/BUILD.template | 256 ----- third_party/boringssl | 2 +- third_party/zlib.BUILD | 37 + 7 files changed, 250 insertions(+), 2083 deletions(-) create mode 100644 WORKSPACE create mode 100644 grpc-build-system.bzl delete mode 100644 templates/BUILD.template create mode 100644 third_party/zlib.BUILD diff --git a/.gitignore b/.gitignore index ed015b3c92e..febcaf7942c 100644 --- a/.gitignore +++ b/.gitignore @@ -103,3 +103,10 @@ artifacts/ # IDE specific folder for JetBrains IDEs .idea/ + +# Blaze files +bazel-bin +bazel-genfiles +bazel-grpc +bazel-out +bazel-testlogs diff --git a/BUILD b/BUILD index 5c4333463c6..a0320bc5bf0 100644 --- a/BUILD +++ b/BUILD @@ -1,11 +1,6 @@ # GRPC Bazel BUILD file. -# This currently builds C, C++ and Objective-C code. -# This file has been automatically generated from a template file. -# Please look at the templates directory instead. -# This file can be regenerated from the template by running -# tools/buildgen/generate_projects.sh - -# Copyright 2015, Google Inc. +# +# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,11 +35,12 @@ exports_files(["LICENSE"]) package(default_visibility = ["//visibility:public"]) +load(":grpc-build-system.bzl", "grpc_cc_library") +g_stands_for = "good" +version = "1.1.0-dev" - - -cc_library( +grpc_cc_library( name = "gpr", srcs = [ "src/core/lib/profiling/timers.h", @@ -149,17 +145,11 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", ], - includes = [ - "include", - ".", - ], - deps = [ - ], ) -cc_library( +grpc_cc_library( name = "grpc", srcs = [ "src/core/lib/channel/channel_args.h", @@ -547,351 +537,141 @@ cc_library( "include/grpc/grpc_security.h", "include/grpc/census.h", ], - includes = [ - "include", - ".", - ], deps = [ "//external:libssl", "//external:zlib", ":gpr", "//external:nanopb", ], - copts = [ - "-std=gnu99", - ], + language = "C", ) - -cc_library( - name = "grpc_cronet", +grpc_cc_library( + name = "grpc++", srcs = [ - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", - "src/core/lib/surface/init.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", - "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", - "src/core/plugin_registry/grpc_cronet_plugin_registry.c", + "include/grpc++/impl/codegen/core_codegen.h", + "src/cpp/client/secure_credentials.h", + "src/cpp/common/secure_auth_context.h", + "src/cpp/server/secure_server_credentials.h", + "src/cpp/client/create_channel_internal.h", + "src/cpp/common/channel_filter.h", + "src/cpp/server/dynamic_thread_pool.h", + "src/cpp/server/thread_pool_interface.h", + "src/cpp/client/insecure_credentials.cc", + "src/cpp/client/secure_credentials.cc", + "src/cpp/common/auth_property_iterator.cc", + "src/cpp/common/secure_auth_context.cc", + "src/cpp/common/secure_channel_arguments.cc", + "src/cpp/common/secure_create_auth_context.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/secure_server_credentials.cc", + "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/rpc_method.cc", + "src/cpp/server/async_generic_service.cc", + "src/cpp/server/create_default_thread_pool.cc", + "src/cpp/server/dynamic_thread_pool.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/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", + "src/cpp/codegen/codegen_init.cc", ], hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", + "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++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", + "include/grpc++/grpc++.h", + "include/grpc++/impl/call.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.h", + "include/grpc++/impl/sync_cxx11.h", + "include/grpc++/impl/sync_no_cxx11.h", + "include/grpc++/impl/thd.h", + "include/grpc++/impl/thd_cxx11.h", + "include/grpc++/impl/thd_no_cxx11.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", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/create_auth_context.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/status_helper.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", @@ -909,1484 +689,10 @@ cc_library( "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", - "include/grpc/grpc_cronet.h", - "include/grpc/grpc_security.h", - ], - includes = [ - "include", - ".", ], deps = [ "//external:libssl", - ":gpr", - ], -) - - - -cc_library( - name = "grpc_unsecure", - srcs = [ - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", - "src/core/ext/load_reporting/load_reporting.h", - "src/core/ext/load_reporting/load_reporting_filter.h", - "src/core/ext/lb_policy/grpclb/grpclb.h", - "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", - "src/core/ext/census/aggregation.h", - "src/core/ext/census/base_resources.h", - "src/core/ext/census/census_interface.h", - "src/core/ext/census/census_rpc_stats.h", - "src/core/ext/census/gen/census.pb.h", - "src/core/ext/census/gen/trace_context.pb.h", - "src/core/ext/census/grpc_filter.h", - "src/core/ext/census/mlog.h", - "src/core/ext/census/resource.h", - "src/core/ext/census/rpc_metric_id.h", - "src/core/ext/census/trace_context.h", - "src/core/lib/surface/init.c", - "src/core/lib/surface/init_unsecure.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", - "src/core/ext/resolver/dns/native/dns_resolver.c", - "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", - "src/core/ext/load_reporting/load_reporting.c", - "src/core/ext/load_reporting/load_reporting_filter.c", - "src/core/ext/lb_policy/grpclb/grpclb.c", - "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", - "src/core/ext/lb_policy/pick_first/pick_first.c", - "src/core/ext/lb_policy/round_robin/round_robin.c", - "src/core/ext/census/base_resources.c", - "src/core/ext/census/context.c", - "src/core/ext/census/gen/census.pb.c", - "src/core/ext/census/gen/trace_context.pb.c", - "src/core/ext/census/grpc_context.c", - "src/core/ext/census/grpc_filter.c", - "src/core/ext/census/grpc_plugin.c", - "src/core/ext/census/initialize.c", - "src/core/ext/census/mlog.c", - "src/core/ext/census/operation.c", - "src/core/ext/census/placeholders.c", - "src/core/ext/census/resource.c", - "src/core/ext/census/trace_context.c", - "src/core/ext/census/tracing.c", - "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", - ], - hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc/census.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - ":gpr", - "//external:nanopb", - ], - copts = [ - "-std=gnu99", - ], -) - - - -cc_library( - name = "grpc++", - srcs = [ - "include/grpc++/impl/codegen/core_codegen.h", - "src/cpp/client/secure_credentials.h", - "src/cpp/common/secure_auth_context.h", - "src/cpp/server/secure_server_credentials.h", - "src/cpp/client/create_channel_internal.h", - "src/cpp/common/channel_filter.h", - "src/cpp/server/dynamic_thread_pool.h", - "src/cpp/server/thread_pool_interface.h", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/client/secure_credentials.cc", - "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/secure_auth_context.cc", - "src/cpp/common/secure_channel_arguments.cc", - "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/server/secure_server_credentials.cc", - "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/rpc_method.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/dynamic_thread_pool.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/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", - "src/cpp/codegen/codegen_init.cc", - ], - 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++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/grpc++.h", - "include/grpc++/impl/call.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.h", - "include/grpc++/impl/sync_cxx11.h", - "include/grpc++/impl/sync_no_cxx11.h", - "include/grpc++/impl/thd.h", - "include/grpc++/impl/thd_cxx11.h", - "include/grpc++/impl/thd_no_cxx11.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", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - "//external:libssl", - "//external:protobuf_clib", - ":grpc", - ], -) - - - -cc_library( - name = "grpc++_reflection", - srcs = [ - "src/cpp/ext/proto_server_reflection.h", - "src/cpp/ext/proto_server_reflection.cc", - "src/cpp/ext/proto_server_reflection_plugin.cc", - "src/cpp/ext/reflection.grpc.pb.cc", - "src/cpp/ext/reflection.pb.cc", - ], - hdrs = [ - "include/grpc++/ext/proto_server_reflection_plugin.h", - "include/grpc++/ext/reflection.grpc.pb.h", - "include/grpc++/ext/reflection.pb.h", - "include/grpc++/impl/codegen/proto_utils.h", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc++/impl/codegen/config_protobuf.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - ":grpc++", - ], -) - - - -cc_library( - name = "grpc++_unsecure", - srcs = [ - "src/cpp/client/create_channel_internal.h", - "src/cpp/common/channel_filter.h", - "src/cpp/server/dynamic_thread_pool.h", - "src/cpp/server/thread_pool_interface.h", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/insecure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - "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/rpc_method.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/dynamic_thread_pool.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/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", - "src/cpp/codegen/codegen_init.cc", - ], - 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++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/grpc++.h", - "include/grpc++/impl/call.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.h", - "include/grpc++/impl/sync_cxx11.h", - "include/grpc++/impl/sync_no_cxx11.h", - "include/grpc++/impl/thd.h", - "include/grpc++/impl/thd_cxx11.h", - "include/grpc++/impl/thd_no_cxx11.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", - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - "//external:protobuf_clib", - ":gpr", - ":grpc_unsecure", - ], -) - - - -cc_library( - name = "grpc_plugin_support", - srcs = [ - "src/compiler/config.h", - "src/compiler/cpp_generator.h", - "src/compiler/cpp_generator_helpers.h", - "src/compiler/csharp_generator.h", - "src/compiler/csharp_generator_helpers.h", - "src/compiler/generator_helpers.h", - "src/compiler/node_generator.h", - "src/compiler/node_generator_helpers.h", - "src/compiler/objective_c_generator.h", - "src/compiler/objective_c_generator_helpers.h", - "src/compiler/php_generator.h", - "src/compiler/php_generator_helpers.h", - "src/compiler/python_generator.h", - "src/compiler/ruby_generator.h", - "src/compiler/ruby_generator_helpers-inl.h", - "src/compiler/ruby_generator_map-inl.h", - "src/compiler/ruby_generator_string-inl.h", - "src/compiler/cpp_generator.cc", - "src/compiler/csharp_generator.cc", - "src/compiler/node_generator.cc", - "src/compiler/objective_c_generator.cc", - "src/compiler/php_generator.cc", - "src/compiler/python_generator.cc", - "src/compiler/ruby_generator.cc", - ], - hdrs = [ - "include/grpc++/impl/codegen/config_protobuf.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - "//external:protobuf_compiler", - ], -) - - - -cc_library( - name = "grpc_csharp_ext", - srcs = [ - "src/csharp/ext/grpc_csharp_ext.c", - ], - hdrs = [ - ], - includes = [ - "include", - ".", - ], - deps = [ - ":grpc", - ":gpr", - ], -) - - - - -objc_library( - name = "gpr_objc", - srcs = [ - "src/core/lib/profiling/basic_timers.c", - "src/core/lib/profiling/stap_timers.c", - "src/core/lib/support/alloc.c", - "src/core/lib/support/avl.c", - "src/core/lib/support/backoff.c", - "src/core/lib/support/cmdline.c", - "src/core/lib/support/cpu_iphone.c", - "src/core/lib/support/cpu_linux.c", - "src/core/lib/support/cpu_posix.c", - "src/core/lib/support/cpu_windows.c", - "src/core/lib/support/env_linux.c", - "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_windows.c", - "src/core/lib/support/histogram.c", - "src/core/lib/support/host_port.c", - "src/core/lib/support/log.c", - "src/core/lib/support/log_android.c", - "src/core/lib/support/log_linux.c", - "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_windows.c", - "src/core/lib/support/mpscq.c", - "src/core/lib/support/murmur_hash.c", - "src/core/lib/support/percent_encoding.c", - "src/core/lib/support/slice.c", - "src/core/lib/support/slice_buffer.c", - "src/core/lib/support/stack_lockfree.c", - "src/core/lib/support/string.c", - "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_util_windows.c", - "src/core/lib/support/string_windows.c", - "src/core/lib/support/subprocess_posix.c", - "src/core/lib/support/subprocess_windows.c", - "src/core/lib/support/sync.c", - "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_windows.c", - "src/core/lib/support/thd.c", - "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_windows.c", - "src/core/lib/support/time.c", - "src/core/lib/support/time_posix.c", - "src/core/lib/support/time_precise.c", - "src/core/lib/support/time_windows.c", - "src/core/lib/support/tls_pthread.c", - "src/core/lib/support/tmpfile_msys.c", - "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_windows.c", - "src/core/lib/support/wrap_memcpy.c", - ], - hdrs = [ - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/atm_gcc_atomic.h", - "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_windows.h", - "include/grpc/support/avl.h", - "include/grpc/support/cmdline.h", - "include/grpc/support/cpu.h", - "include/grpc/support/histogram.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/log_windows.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", - "include/grpc/support/sync.h", - "include/grpc/support/sync_generic.h", - "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_windows.h", - "include/grpc/support/thd.h", - "include/grpc/support/time.h", - "include/grpc/support/tls.h", - "include/grpc/support/tls_gcc.h", - "include/grpc/support/tls_msvc.h", - "include/grpc/support/tls_pthread.h", - "include/grpc/support/useful.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "src/core/lib/profiling/timers.h", - "src/core/lib/support/backoff.h", - "src/core/lib/support/block_annotate.h", - "src/core/lib/support/env.h", - "src/core/lib/support/mpscq.h", - "src/core/lib/support/murmur_hash.h", - "src/core/lib/support/percent_encoding.h", - "src/core/lib/support/stack_lockfree.h", - "src/core/lib/support/string.h", - "src/core/lib/support/string_windows.h", - "src/core/lib/support/thd_internal.h", - "src/core/lib/support/time_precise.h", - "src/core/lib/support/tmpfile.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - ], -) - - - -objc_library( - name = "grpc_objc", - srcs = [ - "src/core/lib/surface/init.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", - "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - "src/core/ext/lb_policy/grpclb/grpclb.c", - "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", - "src/core/ext/lb_policy/pick_first/pick_first.c", - "src/core/ext/lb_policy/round_robin/round_robin.c", - "src/core/ext/resolver/dns/native/dns_resolver.c", - "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", - "src/core/ext/load_reporting/load_reporting.c", - "src/core/ext/load_reporting/load_reporting_filter.c", - "src/core/ext/census/base_resources.c", - "src/core/ext/census/context.c", - "src/core/ext/census/gen/census.pb.c", - "src/core/ext/census/gen/trace_context.pb.c", - "src/core/ext/census/grpc_context.c", - "src/core/ext/census/grpc_filter.c", - "src/core/ext/census/grpc_plugin.c", - "src/core/ext/census/initialize.c", - "src/core/ext/census/mlog.c", - "src/core/ext/census/operation.c", - "src/core/ext/census/placeholders.c", - "src/core/ext/census/resource.c", - "src/core/ext/census/trace_context.c", - "src/core/ext/census/tracing.c", - "src/core/plugin_registry/grpc_plugin_registry.c", - ], - hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - "include/grpc/grpc_security.h", - "include/grpc/census.h", - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", - "src/core/ext/lb_policy/grpclb/grpclb.h", - "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", - "src/core/ext/load_reporting/load_reporting.h", - "src/core/ext/load_reporting/load_reporting_filter.h", - "src/core/ext/census/aggregation.h", - "src/core/ext/census/base_resources.h", - "src/core/ext/census/census_interface.h", - "src/core/ext/census/census_rpc_stats.h", - "src/core/ext/census/gen/census.pb.h", - "src/core/ext/census/gen/trace_context.pb.h", - "src/core/ext/census/grpc_filter.h", - "src/core/ext/census/mlog.h", - "src/core/ext/census/resource.h", - "src/core/ext/census/rpc_metric_id.h", - "src/core/ext/census/trace_context.h", - ], - includes = [ - "include", - ".", - ], - deps = [ - ":gpr_objc", - "//external:libssl_objc", - "//external:nanopb", - ], - sdk_dylibs = ["libz"], -) - - - -cc_binary( - name = "grpc_cpp_plugin", - srcs = [ - "src/compiler/cpp_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_csharp_plugin", - srcs = [ - "src/compiler/csharp_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_node_plugin", - srcs = [ - "src/compiler/node_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_objective_c_plugin", - srcs = [ - "src/compiler/objective_c_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_php_plugin", - srcs = [ - "src/compiler/php_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_python_plugin", - srcs = [ - "src/compiler/python_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - -cc_binary( - name = "grpc_ruby_plugin", - srcs = [ - "src/compiler/ruby_plugin.cc", - ], - deps = [ - "//external:protobuf_compiler", - ":grpc_plugin_support", - ], -) - - - - - - - - -objc_path = "src/objective-c" - -rx_library_path = objc_path + "/RxLibrary" - -objc_library( - name = "rx_library", - hdrs = glob([ - rx_library_path + "/*.h", - rx_library_path + "/transformations/*.h", - ]), - srcs = glob([ - rx_library_path + "/*.m", - rx_library_path + "/transformations/*.m", - ]), - includes = [objc_path], - deps = [ - ":rx_library_private", - ], -) - -objc_library( - name = "rx_library_private", - hdrs = glob([rx_library_path + "/private/*.h"]), - srcs = glob([rx_library_path + "/private/*.m"]), - visibility = ["//visibility:private"], -) - -objc_client_path = objc_path + "/GRPCClient" - -objc_library( - name = "grpc_client", - hdrs = glob([ - objc_client_path + "/*.h", - objc_client_path + "/private/*.h", - ]), - srcs = glob([ - objc_client_path + "/*.m", - objc_client_path + "/private/*.m", - ]), - includes = [objc_path], - bundles = [":gRPCCertificates"], - deps = [ - ":grpc_objc", - ":rx_library", - ], -) - -objc_bundle_library( - # The choice of name is signicant here, since it determines the bundle name. - name = "gRPCCertificates", - resources = ["etc/roots.pem"], -) - -proto_objc_rpc_path = objc_path + "/ProtoRPC" - -objc_library( - name = "proto_objc_rpc", - hdrs = glob([ - proto_objc_rpc_path + "/*.h", - ]), - srcs = glob([ - proto_objc_rpc_path + "/*.m", - ]), - includes = [objc_path], - deps = [ - ":grpc_client", - ":rx_library", - "//external:protobuf_objc", + "//external:protobuf_clib", + ":grpc", ], ) diff --git a/WORKSPACE b/WORKSPACE new file mode 100644 index 00000000000..6a1b70e1528 --- /dev/null +++ b/WORKSPACE @@ -0,0 +1,42 @@ +bind( + name = "nanopb", + actual = "//third_party/nanopb", +) + +bind( + name = "libssl", + actual = "@submodule_boringssl//:ssl", +) + +bind( + name = "zlib", + actual = "@submodule_zlib//:z", +) + +bind( + name = "protobuf_clib", + actual = "@submodule_protobuf//:protoc_lib", +) + +bind( + name = "protobuf_compiler", + actual = "@submodule_protobuf//:protoc_lib", +) + +new_local_repository( + name = "submodule_boringssl", + path = "third_party/boringssl", + build_file = "third_party/boringssl/BUILD", +) + +new_local_repository( + name = "submodule_zlib", + path = "third_party/zlib", + build_file = "third_party/zlib.BUILD", +) + +new_local_repository( + name = "submodule_protobuf", + path = "third_party/protobuf", + build_file = "third_party/protobuf/BUILD", +) diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl new file mode 100644 index 00000000000..1d6d1a42c2d --- /dev/null +++ b/grpc-build-system.bzl @@ -0,0 +1,31 @@ +def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"): + copts = [] + if language == "C": + copts = ["-std=c99"] + native.cc_library( + name = name, + srcs = srcs, + hdrs = hdrs, + deps = deps, + copts = copts, + includes = [ + "include" + ] + ) + + +def nanopb(): + native.cc_library( + name = "nanopb", + srcs = [ + '//third_party/nanopb/pb_common.c', + '//third_party/nanopb/pb_decode.c', + '//third_party/nanopb/pb_encode.c', + ], + hdrs = [ + '//third_party/nanopb/pb.h', + '//third_party/nanopb/pb_common.h', + '//third_party/nanopb/pb_decode.h', + '//third_party/nanopb/pb_encode.h', + ] + ) diff --git a/templates/BUILD.template b/templates/BUILD.template deleted file mode 100644 index af23fb27994..00000000000 --- a/templates/BUILD.template +++ /dev/null @@ -1,256 +0,0 @@ -%YAML 1.2 ---- | - # GRPC Bazel BUILD file. - # This currently builds C, C++ and Objective-C code. - # This file has been automatically generated from a template file. - # Please look at the templates directory instead. - # This file can be regenerated from the template by running - # tools/buildgen/generate_projects.sh - - # Copyright 2015, Google Inc. - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are - # met: - # - # * Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # * Redistributions in binary form must reproduce the above - # copyright notice, this list of conditions and the following disclaimer - # in the documentation and/or other materials provided with the - # distribution. - # * Neither the name of Google Inc. nor the names of its - # contributors may be used to endorse or promote products derived from - # this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - licenses(["notice"]) # 3-clause BSD - - exports_files(["LICENSE"]) - - package(default_visibility = ["//visibility:public"]) - - <%! - def get_deps(target_dict): - deps = [] - if target_dict.get('secure', False): - deps = [ - "//external:libssl", - ] - if target_dict.get('build', None) == 'protoc': - deps.append("//external:protobuf_compiler") - if (target_dict['name'] == 'grpc++_unsecure' or - target_dict['name'] == 'grpc++' or - target_dict['name'] == 'grpc++_codegen_lib'): - deps.append("//external:protobuf_clib") - elif target_dict['name'] == 'grpc': - deps.append("//external:zlib") - for d in target_dict.get('deps', []): - if d.find('//') == 0 or d[0] == ':': - deps.append(d) - else: - deps.append(':%s' % (d)) - return deps - %> - - % for lib in libs: - % if lib.build in ("all", "protoc"): - ${cc_library(lib)} - % endif - % endfor - - % for lib in libs: - % if lib.name in ("grpc", "gpr"): - ${objc_library(lib)} - % endif - % endfor - - % for tgt in targets: - % if tgt.build == 'protoc': - ${cc_binary(tgt)} - % endif - % endfor - - <%def name="cc_library(lib)"> - <% - lib_hdrs = lib.get("headers", []) - hdrs = [h for h in lib_hdrs if not h.startswith('third_party/nanopb')] - srcs = [s for s in lib.src if not s.startswith('third_party/nanopb')] - uses_nanopb = len(lib_hdrs) != len(hdrs) or len(srcs) != len(lib.src) - %> - cc_library( - name = "${lib.name}", - srcs = [ - % for hdr in hdrs: - "${hdr}", - % endfor - % for src in srcs: - "${src}", - % endfor - ], - hdrs = [ - % for hdr in lib.get("public_headers", []): - "${hdr}", - % endfor - ], - includes = [ - "include", - ".", - ], - deps = [ - % for dep in get_deps(lib): - "${dep}", - % endfor - % if uses_nanopb: - "//external:nanopb", - % endif - ], - % if lib.name in ("grpc", "grpc_unsecure"): - copts = [ - "-std=gnu99", - ], - % endif - ) - - - <%def name="objc_library(lib)"> - <% - lib_hdrs = lib.get("headers", []) - hdrs = [h for h in lib_hdrs if not h.startswith('third_party/nanopb')] - srcs = [s for s in lib.src if not s.startswith('third_party/nanopb')] - uses_nanopb = len(lib_hdrs) != len(hdrs) or len(srcs) != len(lib.src) - %> - objc_library( - name = "${lib.name}_objc", - srcs = [ - % for src in srcs: - "${src}", - % endfor - ], - hdrs = [ - % for hdr in lib.get("public_headers", []): - "${hdr}", - % endfor - % for hdr in hdrs: - "${hdr}", - % endfor - ], - includes = [ - "include", - ".", - ], - deps = [ - % for dep in lib.get("deps", []): - ":${dep}_objc", - % endfor - % if lib.get('secure', False): - "//external:libssl_objc", - % endif - % if uses_nanopb: - "//external:nanopb", - % endif - ], - % if lib.get("baselib", false): - sdk_dylibs = ["libz"], - % endif - ) - - - <%def name="cc_binary(tgt)"> - cc_binary( - name = "${tgt.name}", - srcs = [ - % for src in tgt.src: - "${src}", - % endfor - ], - deps = [ - % for dep in get_deps(tgt): - "${dep}", - % endfor - ], - ) - - - objc_path = "src/objective-c" - - rx_library_path = objc_path + "/RxLibrary" - - objc_library( - name = "rx_library", - hdrs = glob([ - rx_library_path + "/*.h", - rx_library_path + "/transformations/*.h", - ]), - srcs = glob([ - rx_library_path + "/*.m", - rx_library_path + "/transformations/*.m", - ]), - includes = [objc_path], - deps = [ - ":rx_library_private", - ], - ) - - objc_library( - name = "rx_library_private", - hdrs = glob([rx_library_path + "/private/*.h"]), - srcs = glob([rx_library_path + "/private/*.m"]), - visibility = ["//visibility:private"], - ) - - objc_client_path = objc_path + "/GRPCClient" - - objc_library( - name = "grpc_client", - hdrs = glob([ - objc_client_path + "/*.h", - objc_client_path + "/private/*.h", - ]), - srcs = glob([ - objc_client_path + "/*.m", - objc_client_path + "/private/*.m", - ]), - includes = [objc_path], - bundles = [":gRPCCertificates"], - deps = [ - ":grpc_objc", - ":rx_library", - ], - ) - - objc_bundle_library( - # The choice of name is signicant here, since it determines the bundle name. - name = "gRPCCertificates", - resources = ["etc/roots.pem"], - ) - - proto_objc_rpc_path = objc_path + "/ProtoRPC" - - objc_library( - name = "proto_objc_rpc", - hdrs = glob([ - proto_objc_rpc_path + "/*.h", - ]), - srcs = glob([ - proto_objc_rpc_path + "/*.m", - ]), - includes = [objc_path], - deps = [ - ":grpc_client", - ":rx_library", - "//external:protobuf_objc", - ], - ) diff --git a/third_party/boringssl b/third_party/boringssl index c880e42ba1c..d4f6204cf17 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 +Subproject commit d4f6204cf17ac99cfcbb2a6803483af650c88256 diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD new file mode 100644 index 00000000000..323c2868a85 --- /dev/null +++ b/third_party/zlib.BUILD @@ -0,0 +1,37 @@ +cc_library( + name = "z", + linkstatic = 1, + srcs = [ + 'adler32.c', + 'compress.c', + 'crc32.c', + 'deflate.c', + 'infback.c', + 'inffast.c', + 'inflate.c', + 'inftrees.c', + 'trees.c', + 'uncompr.c', + 'zutil.c', + ], + hdrs = [ + 'crc32.h', + 'deflate.h', + 'gzguts.h', + 'inffast.h', + 'inffixed.h', + 'inflate.h', + 'inftrees.h', + 'trees.h', + 'zconf.h', + 'zlib.h', + 'zutil.h', + ], + includes = [ + 'include', + ], + visibility = [ + "//visibility:public", + ], +) + From 60ca22fef5e6e89311eee11c7aa6d7a6a5aff430 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 10:23:53 +0200 Subject: [PATCH 02/23] Basic testing. --- grpc-build-system.bzl | 1 + test/core/support/BUILD | 125 ++++++++++++++++++++++++++++++++++++++++ test/core/util/BUILD | 45 +++++++++++++++ 3 files changed, 171 insertions(+) create mode 100644 test/core/support/BUILD create mode 100644 test/core/util/BUILD diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index 1d6d1a42c2d..c18c57f087a 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -8,6 +8,7 @@ def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, l hdrs = hdrs, deps = deps, copts = copts, + linkopts = ["-pthread"], includes = [ "include" ] diff --git a/test/core/support/BUILD b/test/core/support/BUILD new file mode 100644 index 00000000000..50b8ca37c25 --- /dev/null +++ b/test/core/support/BUILD @@ -0,0 +1,125 @@ +cc_test( + name = "alloc_test", + srcs = ["alloc_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "avl_test", + srcs = ["avl_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "backoff_test", + srcs = ["backoff_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "cmdline_test", + srcs = ["cmdline_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "cpu_test", + srcs = ["cpu_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "env_test", + srcs = ["env_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "histogram_test", + srcs = ["histogram_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "host_port_test", + srcs = ["host_port_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "log_test", + srcs = ["log_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "mpscq_test", + srcs = ["mpscq_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "murmur_hash_test", + srcs = ["murmur_hash_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "percent_encoding_test", + srcs = ["percent_encoding_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "slice_buffer_test", + srcs = ["slice_buffer_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "slice_test", + srcs = ["slice_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "stack_lockfree_test", + srcs = ["stack_lockfree_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "string_test", + srcs = ["string_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "sync_test", + srcs = ["sync_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "thd_test", + srcs = ["thd_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "time_test", + srcs = ["time_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "tls_test", + srcs = ["tls_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) + +cc_test( + name = "useful_test", + srcs = ["useful_test.c"], + deps = ["//:gpr", "//test/core/util:gpr_test_util"], +) diff --git a/test/core/util/BUILD b/test/core/util/BUILD new file mode 100644 index 00000000000..60dd6d98954 --- /dev/null +++ b/test/core/util/BUILD @@ -0,0 +1,45 @@ + + +cc_library( + name = "gpr_test_util", + srcs = [ + "test_config.c", + ], + hdrs = [ + "test_config.h", + ], + deps = ["//:gpr"], + visibility = ["//:__subpackages__"], +) + +cc_library( + name = "grpc_test_util", + srcs = [ + "grpc_profiler.c", + "memory_counters.c", + "mock_endpoint.c", + "one_corpus_entry_fuzzer.c", + "parse_hexstring.c", + "passthru_endpoint.c", + "port_posix.c", + "port_server_client.c", + "port_windows.c", + "reconnect_server.c", + "slice_splitter.c", + "test_tcp_server.c", + ], + hdrs = [ + "grpc_profiler.h", + "memory_counters.h", + "mock_endpoint.h", + "parse_hexstring.h", + "passthru_endpoint.h", + "port.h", + "port_server_client.h", + "reconnect_server.h", + "slice_splitter.h", + "test_tcp_server.h", + ], + deps = [":gpr_test_util", "//:grpc"], + visibility = ["//:__subpackages__"], +) From 423ecff2dea164ba96a14d06cad35ad307a128b8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 09:45:09 -0700 Subject: [PATCH 03/23] Add copyright --- grpc-build-system.bzl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index c18c57f087a..c1a61efd123 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -1,3 +1,32 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"): copts = [] if language == "C": From e8dbd8aaae5d813546abe4956361c4e6512d8c88 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 18:54:36 +0200 Subject: [PATCH 04/23] Adding back external_deps and public_hdrs. --- BUILD | 14 +++++++++----- grpc-build-system.bzl | 29 +++++++++-------------------- 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/BUILD b/BUILD index a0320bc5bf0..eeca0641895 100644 --- a/BUILD +++ b/BUILD @@ -537,11 +537,13 @@ grpc_cc_library( "include/grpc/grpc_security.h", "include/grpc/census.h", ], + external_deps = [ + "libssl", + "zlib", + "nanopb", + ], deps = [ - "//external:libssl", - "//external:zlib", ":gpr", - "//external:nanopb", ], language = "C", ) @@ -690,9 +692,11 @@ grpc_cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", ], + external_deps = [ + "libssl", + "protobuf_clib", + ], deps = [ - "//external:libssl", - "//external:protobuf_clib", ":grpc", ], ) diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index c18c57f087a..8ae362624ca 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -1,32 +1,21 @@ -def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"): +# +# This is for the gRPC build system. This isn't intended to be used outsite of +# the BUILD file for gRPC. It contains the mapping for the template system we +# use to generate other platform's build system files. +# + +def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"): copts = [] if language == "C": copts = ["-std=c99"] native.cc_library( name = name, srcs = srcs, - hdrs = hdrs, - deps = deps, + hdrs = hdrs + public_hdrs, + deps = deps + ["//external:" + dep for dep in external_deps], copts = copts, linkopts = ["-pthread"], includes = [ "include" ] ) - - -def nanopb(): - native.cc_library( - name = "nanopb", - srcs = [ - '//third_party/nanopb/pb_common.c', - '//third_party/nanopb/pb_decode.c', - '//third_party/nanopb/pb_encode.c', - ], - hdrs = [ - '//third_party/nanopb/pb.h', - '//third_party/nanopb/pb_common.h', - '//third_party/nanopb/pb_decode.h', - '//third_party/nanopb/pb_encode.h', - ] - ) From ed5215dc87067b741167b0a4f29c6feeafd5857c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 10:49:13 -0700 Subject: [PATCH 05/23] fix merge --- grpc-build-system.bzl | 3 --- 1 file changed, 3 deletions(-) diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index 393aa42ca03..0ef3a0ea07d 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -28,8 +28,6 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"): -======= # # This is for the gRPC build system. This isn't intended to be used outsite of # the BUILD file for gRPC. It contains the mapping for the template system we @@ -37,7 +35,6 @@ def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, l # def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"): ->>>>>>> e8dbd8aaae5d813546abe4956361c4e6512d8c88 copts = [] if language == "C": copts = ["-std=c99"] From 857c29f7b334125178a4e3003f943c27237663e0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 10:49:53 -0700 Subject: [PATCH 06/23] fix merge --- grpc-build-system.bzl | 1 - 1 file changed, 1 deletion(-) diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index 0ef3a0ea07d..187cc3e424d 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -1,4 +1,3 @@ -<<<<<<< HEAD # Copyright 2016, Google Inc. # All rights reserved. # From ad57f1678e51eae42b2ae2679063b8ba0982038f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 11:32:28 -0700 Subject: [PATCH 07/23] Begin fuzzing framework --- test/core/support/BUILD | 9 ++++++++ test/core/util/BUILD | 13 ++++++++--- test/core/util/grpc_fuzzer.bzl | 42 ++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 test/core/util/grpc_fuzzer.bzl diff --git a/test/core/support/BUILD b/test/core/support/BUILD index eee086d85e4..499bd0940fd 100644 --- a/test/core/support/BUILD +++ b/test/core/support/BUILD @@ -27,6 +27,8 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") + cc_test( name = "alloc_test", srcs = ["alloc_test.c"], @@ -152,3 +154,10 @@ cc_test( srcs = ["useful_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], ) + +grpc_fuzzer( + name = "percent_encode_fuzzer", + srcs = ["percent_encode_fuzzer.c"], + deps = ["//:gpr"], + corpus = "percent_encode_corpus" +) diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 79e6cfbeeba..82207913ef1 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -4,9 +4,11 @@ cc_library( name = "gpr_test_util", srcs = [ "test_config.c", + "memory_counters.c", ], hdrs = [ "test_config.h", + "memory_counters.h", ], deps = ["//:gpr"], visibility = ["//:__subpackages__"], @@ -16,7 +18,6 @@ cc_library( name = "grpc_test_util", srcs = [ "grpc_profiler.c", - "memory_counters.c", "mock_endpoint.c", "parse_hexstring.c", "passthru_endpoint.c", @@ -29,7 +30,6 @@ cc_library( ], hdrs = [ "grpc_profiler.h", - "memory_counters.h", "mock_endpoint.h", "parse_hexstring.h", "passthru_endpoint.h", @@ -40,5 +40,12 @@ cc_library( "test_tcp_server.h", ], deps = [":gpr_test_util", "//:grpc"], - visibility = ["//:__subpackages__"], + visibility = ["//test:__subpackages__"], +) + +cc_library( + name = "one_corpus_entry_fuzzer", + srcs = ["one_corpus_entry_fuzzer.c"], + deps = [":gpr_test_util", "//:grpc"], + visibility = ["//test:__subpackages__"], ) diff --git a/test/core/util/grpc_fuzzer.bzl b/test/core/util/grpc_fuzzer.bzl new file mode 100644 index 00000000000..1db3aa4234a --- /dev/null +++ b/test/core/util/grpc_fuzzer.bzl @@ -0,0 +1,42 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +def grpc_fuzzer(name, corpus, srcs = [], deps = []): + native.cc_library( + name = "%s/one_entry" % name, + srcs = srcs, + deps = deps + ["//test/core/util:one_corpus_entry_fuzzer"], + ) + for entry in native.glob(['%s/*' % corpus]): + native.cc_test( + name = '%s/one_entry/%s' % (name, entry), + deps = [':%s/one_entry' % name], + args = [entry], + data = [entry] + ) From 31a1bbd4bc7dc2097ddff45bf661b287b092aab2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 11:45:59 -0700 Subject: [PATCH 08/23] Make fuzzer unit tests work --- test/core/support/BUILD | 21 +++++++++++++++++++++ test/core/util/grpc_fuzzer.bzl | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/test/core/support/BUILD b/test/core/support/BUILD index 499bd0940fd..375cf25cb72 100644 --- a/test/core/support/BUILD +++ b/test/core/support/BUILD @@ -33,126 +33,147 @@ cc_test( name = "alloc_test", srcs = ["alloc_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "avl_test", srcs = ["avl_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "backoff_test", srcs = ["backoff_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "cmdline_test", srcs = ["cmdline_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "cpu_test", srcs = ["cpu_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "env_test", srcs = ["env_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "histogram_test", srcs = ["histogram_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "host_port_test", srcs = ["host_port_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "log_test", srcs = ["log_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "mpscq_test", srcs = ["mpscq_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "murmur_hash_test", srcs = ["murmur_hash_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "percent_encoding_test", srcs = ["percent_encoding_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "slice_buffer_test", srcs = ["slice_buffer_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "slice_test", srcs = ["slice_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "stack_lockfree_test", srcs = ["stack_lockfree_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "string_test", srcs = ["string_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "sync_test", srcs = ["sync_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "thd_test", srcs = ["thd_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "time_test", srcs = ["time_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "tls_test", srcs = ["tls_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) cc_test( name = "useful_test", srcs = ["useful_test.c"], deps = ["//:gpr", "//test/core/util:gpr_test_util"], + copts = ['-std=c99'] ) grpc_fuzzer( diff --git a/test/core/util/grpc_fuzzer.bzl b/test/core/util/grpc_fuzzer.bzl index 1db3aa4234a..d9a227641ce 100644 --- a/test/core/util/grpc_fuzzer.bzl +++ b/test/core/util/grpc_fuzzer.bzl @@ -37,6 +37,6 @@ def grpc_fuzzer(name, corpus, srcs = [], deps = []): native.cc_test( name = '%s/one_entry/%s' % (name, entry), deps = [':%s/one_entry' % name], - args = [entry], + args = ['$(location %s)' % entry], data = [entry] ) From d3e645f07d2c939c1dc7aa1bfda70d592d8491ca Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 12:15:27 -0700 Subject: [PATCH 09/23] e2e fuzzers --- test/core/support/BUILD | 9 +++++++++ test/core/util/BUILD | 1 + test/core/util/grpc_fuzzer.bzl | 5 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/test/core/support/BUILD b/test/core/support/BUILD index 375cf25cb72..ac33176f00d 100644 --- a/test/core/support/BUILD +++ b/test/core/support/BUILD @@ -182,3 +182,12 @@ grpc_fuzzer( deps = ["//:gpr"], corpus = "percent_encode_corpus" ) + + +grpc_fuzzer( + name = "percent_decode_fuzzer", + srcs = ["percent_decode_fuzzer.c"], + deps = ["//:gpr"], + corpus = "percent_decode_corpus" +) + diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 82207913ef1..e44e4e2105d 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -41,6 +41,7 @@ cc_library( ], deps = [":gpr_test_util", "//:grpc"], visibility = ["//test:__subpackages__"], + copts = ["-std=c99"], ) cc_library( diff --git a/test/core/util/grpc_fuzzer.bzl b/test/core/util/grpc_fuzzer.bzl index d9a227641ce..3ec9e4e485e 100644 --- a/test/core/util/grpc_fuzzer.bzl +++ b/test/core/util/grpc_fuzzer.bzl @@ -27,16 +27,17 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -def grpc_fuzzer(name, corpus, srcs = [], deps = []): +def grpc_fuzzer(name, corpus, srcs = [], deps = [], **kwargs): native.cc_library( name = "%s/one_entry" % name, srcs = srcs, deps = deps + ["//test/core/util:one_corpus_entry_fuzzer"], + **kwargs ) for entry in native.glob(['%s/*' % corpus]): native.cc_test( name = '%s/one_entry/%s' % (name, entry), deps = [':%s/one_entry' % name], args = ['$(location %s)' % entry], - data = [entry] + data = [entry], ) From f4f2eac66d6fbec4822ca0b08edf0cf96fa4f1f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 12:26:53 -0700 Subject: [PATCH 10/23] All fuzzers --- test/core/client_config/BUILD | 39 ++++++++++++++++++++++ test/core/end2end/fuzzers/BUILD | 55 ++++++++++++++++++++++++++++++++ test/core/http/BUILD | 47 +++++++++++++++++++++++++++ test/core/json/BUILD | 39 ++++++++++++++++++++++ test/core/nanopb/BUILD | 47 +++++++++++++++++++++++++++ test/core/transport/chttp2/BUILD | 38 ++++++++++++++++++++++ 6 files changed, 265 insertions(+) create mode 100644 test/core/client_config/BUILD create mode 100644 test/core/end2end/fuzzers/BUILD create mode 100644 test/core/http/BUILD create mode 100644 test/core/json/BUILD create mode 100644 test/core/nanopb/BUILD create mode 100644 test/core/transport/chttp2/BUILD diff --git a/test/core/client_config/BUILD b/test/core/client_config/BUILD new file mode 100644 index 00000000000..856206d8ff6 --- /dev/null +++ b/test/core/client_config/BUILD @@ -0,0 +1,39 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") + +grpc_fuzzer( + name = "uri_fuzzer", + srcs = ["uri_fuzzer_test.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "uri_corpus", + copts = ["-std=c99"], +) + diff --git a/test/core/end2end/fuzzers/BUILD b/test/core/end2end/fuzzers/BUILD new file mode 100644 index 00000000000..d08603148e7 --- /dev/null +++ b/test/core/end2end/fuzzers/BUILD @@ -0,0 +1,55 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") + +grpc_fuzzer( + name = "api_fuzzer", + srcs = ["api_fuzzer.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "api_fuzzer_corpus", + copts = ["-std=c99"], +) + +grpc_fuzzer( + name = "client_fuzzer", + srcs = ["client_fuzzer.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "client_fuzzer_corpus", + copts = ["-std=c99"], +) + +grpc_fuzzer( + name = "server_fuzzer", + srcs = ["server_fuzzer.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "server_fuzzer_corpus", + copts = ["-std=c99"], +) + diff --git a/test/core/http/BUILD b/test/core/http/BUILD new file mode 100644 index 00000000000..58d265bd8fb --- /dev/null +++ b/test/core/http/BUILD @@ -0,0 +1,47 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") + +grpc_fuzzer( + name = "response_fuzzer", + srcs = ["response_fuzzer.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "response_corpus", + copts = ["-std=c99"], +) + +grpc_fuzzer( + name = "request_fuzzer", + srcs = ["request_fuzzer.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "request_corpus", + copts = ["-std=c99"], +) + diff --git a/test/core/json/BUILD b/test/core/json/BUILD new file mode 100644 index 00000000000..4b3fbd60768 --- /dev/null +++ b/test/core/json/BUILD @@ -0,0 +1,39 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") + +grpc_fuzzer( + name = "json_fuzzer", + srcs = ["fuzzer.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "corpus", + copts = ["-std=c99"], +) + diff --git a/test/core/nanopb/BUILD b/test/core/nanopb/BUILD new file mode 100644 index 00000000000..bdf79b7fefa --- /dev/null +++ b/test/core/nanopb/BUILD @@ -0,0 +1,47 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") + +grpc_fuzzer( + name = "fuzzer_response", + srcs = ["fuzzer_response.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "corpus_response", + copts = ["-std=c99"], +) + +grpc_fuzzer( + name = "fuzzer_serverlist", + srcs = ["fuzzer_serverlist.c"], + deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], + corpus = "corpus_serverlist", + copts = ["-std=c99"], +) + diff --git a/test/core/transport/chttp2/BUILD b/test/core/transport/chttp2/BUILD new file mode 100644 index 00000000000..5dd205174f9 --- /dev/null +++ b/test/core/transport/chttp2/BUILD @@ -0,0 +1,38 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") + +grpc_fuzzer( + name = "hpack_parser_fuzzer", + srcs = ["hpack_parser_fuzzer_test.c"], + deps = ["//:grpc", "//test/core/util:grpc_test_util"], + corpus = "hpack_parser_corpus" +) + From fab4ab4e3a9f34bbed9333762c241e3dda708ebd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 12:36:42 -0700 Subject: [PATCH 11/23] Bad client tests converted --- test/core/bad_client/BUILD | 32 ++++++++ test/core/bad_client/gen_build_yaml.py | 99 ------------------------- test/core/bad_client/generate_tests.bzl | 68 +++++++++++++++++ test/core/end2end/BUILD | 3 +- 4 files changed, 102 insertions(+), 100 deletions(-) create mode 100644 test/core/bad_client/BUILD delete mode 100755 test/core/bad_client/gen_build_yaml.py create mode 100755 test/core/bad_client/generate_tests.bzl diff --git a/test/core/bad_client/BUILD b/test/core/bad_client/BUILD new file mode 100644 index 00000000000..5406eb9a4b0 --- /dev/null +++ b/test/core/bad_client/BUILD @@ -0,0 +1,32 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load(":generate_tests.bzl", "grpc_bad_client_tests") + +grpc_bad_client_tests() diff --git a/test/core/bad_client/gen_build_yaml.py b/test/core/bad_client/gen_build_yaml.py deleted file mode 100755 index fb86525b1a1..00000000000 --- a/test/core/bad_client/gen_build_yaml.py +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env python2.7 -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -"""Generates the appropriate build.json data for all the bad_client tests.""" - - -import collections -import yaml - -TestOptions = collections.namedtuple('TestOptions', 'flaky cpu_cost') -default_test_options = TestOptions(False, 1.0) - -# maps test names to options -BAD_CLIENT_TESTS = { - 'badreq': default_test_options, - 'connection_prefix': default_test_options._replace(cpu_cost=0.2), - 'headers': default_test_options._replace(cpu_cost=0.2), - 'initial_settings_frame': default_test_options._replace(cpu_cost=0.2), - 'head_of_line_blocking': default_test_options, - 'large_metadata': default_test_options, - 'server_registered_method': default_test_options, - 'simple_request': default_test_options, - 'window_overflow': default_test_options, - 'unknown_frame': default_test_options, -} - -def main(): - json = { - '#': 'generated with test/bad_client/gen_build_json.py', - 'libs': [ - { - 'name': 'bad_client_test', - 'build': 'private', - 'language': 'c', - 'src': [ - 'test/core/bad_client/bad_client.c' - ], - 'headers': [ - 'test/core/bad_client/bad_client.h' - ], - 'vs_proj_dir': 'test/bad_client', - 'deps': [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr' - ] - }], - 'targets': [ - { - 'name': '%s_bad_client_test' % t, - 'cpu_cost': BAD_CLIENT_TESTS[t].cpu_cost, - 'build': 'test', - 'language': 'c', - 'secure': 'no', - 'src': ['test/core/bad_client/tests/%s.c' % t], - 'vs_proj_dir': 'test', - 'deps': [ - 'bad_client_test', - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr' - ] - } - for t in sorted(BAD_CLIENT_TESTS.keys())]} - print yaml.dump(json) - - -if __name__ == '__main__': - main() diff --git a/test/core/bad_client/generate_tests.bzl b/test/core/bad_client/generate_tests.bzl new file mode 100755 index 00000000000..694ddeeab61 --- /dev/null +++ b/test/core/bad_client/generate_tests.bzl @@ -0,0 +1,68 @@ +#!/usr/bin/env python2.7 +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +"""Generates the appropriate build.json data for all the bad_client tests.""" + + +def test_options(): + return struct() + + +# maps test names to options +BAD_CLIENT_TESTS = { + 'badreq': test_options(), + 'connection_prefix': test_options(), + 'headers': test_options(), + 'initial_settings_frame': test_options(), + 'head_of_line_blocking': test_options(), + 'large_metadata': test_options(), + 'server_registered_method': test_options(), + 'simple_request': test_options(), + 'window_overflow': test_options(), + 'unknown_frame': test_options(), +} + +def grpc_bad_client_tests(): + native.cc_library( + name = 'bad_client_test', + srcs = ['bad_client.c'], + hdrs = ['bad_client.h'], + copts = ['-std=c99'], + deps = ['//test/core/util:grpc_test_util', '//:grpc', '//:gpr', '//test/core/end2end:cq_verifier'] + ) + for t, topt in BAD_CLIENT_TESTS.items(): + native.cc_test( + name = '%s_bad_client_test' % t, + srcs = ['tests/%s.c' % t], + deps = [':bad_client_test'], + copts = ['-std=c99'], + ) + diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD index a0b10709cec..f32bd2251aa 100644 --- a/test/core/end2end/BUILD +++ b/test/core/end2end/BUILD @@ -33,7 +33,8 @@ cc_library( name = 'cq_verifier', srcs = ['cq_verifier.c'], hdrs = ['cq_verifier.h'], - deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] + deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'], + visibility = ["//test:__subpackages__"], ) cc_library( From 7e7fd9603cce01f455674c0576166b4d1c9ebdd2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 22:00:08 +0200 Subject: [PATCH 12/23] Split the BUILD file into sub-libraries, and made the end2end tests use ssl certs. --- BUILD | 1056 ++++++++++++----- .../client_config}/message_size_filter.c | 0 .../client_config}/message_size_filter.h | 0 test/core/end2end/BUILD | 6 + 4 files changed, 750 insertions(+), 312 deletions(-) rename src/core/{lib/channel => ext/client_config}/message_size_filter.c (100%) rename src/core/{lib/channel => ext/client_config}/message_size_filter.h (100%) diff --git a/BUILD b/BUILD index eeca0641895..b1bbbffb4b2 100644 --- a/BUILD +++ b/BUILD @@ -1,4 +1,4 @@ -# GRPC Bazel BUILD file. +# gRPC Bazel BUILD file. # # Copyright 2016, Google Inc. # All rights reserved. @@ -42,20 +42,223 @@ version = "1.1.0-dev" grpc_cc_library( name = "gpr", + deps = [ + "gpr_base", + ], + language = "c", + standalone = True, +) + +grpc_cc_library( + name = "grpc", + srcs = [ + "src/core/lib/surface/init.c", + "src/core/plugin_registry/grpc_plugin_registry.c", + ], + deps = [ + "grpc_base", + "grpc_transport_chttp2_server_secure", + "grpc_transport_chttp2_client_secure", + "grpc_transport_chttp2_server_insecure", + "grpc_transport_chttp2_client_insecure", + "grpc_lb_policy_grpclb", + "grpc_lb_policy_pick_first", + "grpc_lb_policy_round_robin", + "grpc_resolver_dns_native", + "grpc_resolver_sockaddr", + "grpc_load_reporting", + "grpc_secure", + "census", + ], + language = "c", + standalone = True, +) + +grpc_cc_library( + name = "grpc_cronet", + srcs = [ + "src/core/lib/surface/init.c", + "src/core/plugin_registry/grpc_cronet_plugin_registry.c", + ], + deps = [ + "grpc_base", + "grpc_transport_cronet_client_secure", + "grpc_transport_chttp2_client_secure", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_unsecure", + srcs = [ + "src/core/lib/surface/init.c", + "src/core/lib/surface/init_unsecure.c", + "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", + ], + deps = [ + "grpc_base", + "grpc_transport_chttp2_server_insecure", + "grpc_transport_chttp2_client_insecure", + "grpc_resolver_dns_native", + "grpc_resolver_sockaddr", + "grpc_load_reporting", + "grpc_lb_policy_grpclb", + "grpc_lb_policy_pick_first", + "grpc_lb_policy_round_robin", + "census", + ], + language = "c", + standalone = True, +) + +grpc_cc_library( + name = "grpc++", + srcs = [ + "src/cpp/client/insecure_credentials.cc", + "src/cpp/client/secure_credentials.cc", + "src/cpp/common/auth_property_iterator.cc", + "src/cpp/common/secure_auth_context.cc", + "src/cpp/common/secure_channel_arguments.cc", + "src/cpp/common/secure_create_auth_context.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/secure_server_credentials.cc", + ], + hdrs = [ + "include/grpc++/impl/codegen/core_codegen.h", + "src/cpp/client/secure_credentials.h", + "src/cpp/common/secure_auth_context.h", + "src/cpp/server/secure_server_credentials.h", + ], + deps = [ + "gpr", + "grpc", + "grpc++_base", + "grpc++_codegen_base", + "grpc++_codegen_base_src", + ], + language = "c++", + standalone = True, +) + +grpc_cc_library( + name = "grpc++_unsecure", + srcs = [ + "src/cpp/client/insecure_credentials.cc", + "src/cpp/common/insecure_create_auth_context.cc", + "src/cpp/server/insecure_server_credentials.cc", + ], + hdrs = [ + ], + public_hdrs = [ + ], + deps = [ + "gpr", + "grpc_unsecure", + "grpc++_base", + "grpc++_codegen_base", + "grpc++_codegen_base_src", + ], + language = "c++", + standalone = True, +) + +grpc_cc_library( + name = "grpc_plugin_support", + srcs = [ + "src/compiler/cpp_generator.cc", + "src/compiler/csharp_generator.cc", + "src/compiler/node_generator.cc", + "src/compiler/objective_c_generator.cc", + "src/compiler/php_generator.cc", + "src/compiler/python_generator.cc", + "src/compiler/ruby_generator.cc", + ], + hdrs = [ + "src/compiler/config.h", + "src/compiler/cpp_generator.h", + "src/compiler/cpp_generator_helpers.h", + "src/compiler/csharp_generator.h", + "src/compiler/csharp_generator_helpers.h", + "src/compiler/generator_helpers.h", + "src/compiler/node_generator.h", + "src/compiler/node_generator_helpers.h", + "src/compiler/objective_c_generator.h", + "src/compiler/objective_c_generator_helpers.h", + "src/compiler/php_generator.h", + "src/compiler/php_generator_helpers.h", + "src/compiler/python_generator.h", + "src/compiler/ruby_generator.h", + "src/compiler/ruby_generator_helpers-inl.h", + "src/compiler/ruby_generator_map-inl.h", + "src/compiler/ruby_generator_string-inl.h", + ], + external_deps = [ + "protobuf_compiler", + ], + deps = [ + "grpc++_config_proto", + ], + language = "c++", +) + +grpc_cc_library( + name = "grpc_csharp_ext", + srcs = [ + "src/csharp/ext/grpc_csharp_ext.c", + ], + deps = [ + "grpc", + "gpr", + ], + language = "csharp", +) + +grpc_cc_library( + name = "census", + srcs = [ + "src/core/ext/census/base_resources.c", + "src/core/ext/census/context.c", + "src/core/ext/census/gen/census.pb.c", + "src/core/ext/census/gen/trace_context.pb.c", + "src/core/ext/census/grpc_context.c", + "src/core/ext/census/grpc_filter.c", + "src/core/ext/census/grpc_plugin.c", + "src/core/ext/census/initialize.c", + "src/core/ext/census/mlog.c", + "src/core/ext/census/operation.c", + "src/core/ext/census/placeholders.c", + "src/core/ext/census/resource.c", + "src/core/ext/census/trace_context.c", + "src/core/ext/census/tracing.c", + ], + hdrs = [ + "src/core/ext/census/aggregation.h", + "src/core/ext/census/base_resources.h", + "src/core/ext/census/census_interface.h", + "src/core/ext/census/census_rpc_stats.h", + "src/core/ext/census/gen/census.pb.h", + "src/core/ext/census/gen/trace_context.pb.h", + "src/core/ext/census/grpc_filter.h", + "src/core/ext/census/mlog.h", + "src/core/ext/census/resource.h", + "src/core/ext/census/rpc_metric_id.h", + "src/core/ext/census/trace_context.h", + ], + public_hdrs = [ + "include/grpc/census.h", + ], + external_deps = [ + "nanopb", + ], + deps = [ + "grpc_base", + ], + language = "c", +) + +grpc_cc_library( + name = "gpr_base", srcs = [ - "src/core/lib/profiling/timers.h", - "src/core/lib/support/backoff.h", - "src/core/lib/support/block_annotate.h", - "src/core/lib/support/env.h", - "src/core/lib/support/mpscq.h", - "src/core/lib/support/murmur_hash.h", - "src/core/lib/support/percent_encoding.h", - "src/core/lib/support/stack_lockfree.h", - "src/core/lib/support/string.h", - "src/core/lib/support/string_windows.h", - "src/core/lib/support/thd_internal.h", - "src/core/lib/support/time_precise.h", - "src/core/lib/support/tmpfile.h", "src/core/lib/profiling/basic_timers.c", "src/core/lib/profiling/stap_timers.c", "src/core/lib/support/alloc.c", @@ -105,6 +308,21 @@ grpc_cc_library( "src/core/lib/support/wrap_memcpy.c", ], hdrs = [ + "src/core/lib/profiling/timers.h", + "src/core/lib/support/backoff.h", + "src/core/lib/support/block_annotate.h", + "src/core/lib/support/env.h", + "src/core/lib/support/mpscq.h", + "src/core/lib/support/murmur_hash.h", + "src/core/lib/support/percent_encoding.h", + "src/core/lib/support/stack_lockfree.h", + "src/core/lib/support/string.h", + "src/core/lib/support/string_windows.h", + "src/core/lib/support/thd_internal.h", + "src/core/lib/support/time_precise.h", + "src/core/lib/support/tmpfile.h", + ], + public_hdrs = [ "include/grpc/support/alloc.h", "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", @@ -133,6 +351,16 @@ grpc_cc_library( "include/grpc/support/tls_msvc.h", "include/grpc/support/tls_pthread.h", "include/grpc/support/useful.h", + ], + deps = [ + "gpr_codegen", + ], + language = "c", +) + +grpc_cc_library( + name = "gpr_codegen", + public_hdrs = [ "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", @@ -145,13 +373,106 @@ grpc_cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", ], + language = "c", ) - - grpc_cc_library( - name = "grpc", + name = "grpc_base", srcs = [ + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/deadline_filter.c", + "src/core/lib/channel/handshaker.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/compression/compression.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/combiner.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", + "src/core/lib/iomgr/ev_epoll_linux.c", + "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_posix.c", + "src/core/lib/iomgr/ev_posix.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", + "src/core/lib/iomgr/polling_entity.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_cv.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/mdstr_hash_table.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/timeout_encoding.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", + ], + hdrs = [ "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", @@ -162,7 +483,6 @@ grpc_cc_library( "src/core/lib/channel/handshaker.h", "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", "src/core/lib/compression/message_compress.h", "src/core/lib/debug/trace.h", @@ -236,51 +556,52 @@ grpc_cc_library( "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", + ], + public_hdrs = [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", + "include/grpc/grpc_security_constants.h", + "include/grpc/status.h", + ], + external_deps = [ + "zlib", + ], + deps = [ + "grpc_codegen", + "gpr_base", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_client_config", + srcs = [ + "src/core/ext/client_config/channel_connectivity.c", + "src/core/ext/client_config/client_channel.c", + "src/core/ext/client_config/client_channel_factory.c", + "src/core/ext/client_config/client_config_plugin.c", + "src/core/ext/client_config/connector.c", + "src/core/ext/client_config/default_initial_connect_string.c", + "src/core/ext/client_config/http_connect_handshaker.c", + "src/core/ext/client_config/initial_connect_string.c", + "src/core/ext/client_config/lb_policy.c", + "src/core/ext/client_config/lb_policy_factory.c", + "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/message_size_filter.c", + "src/core/ext/client_config/method_config.c", + "src/core/ext/client_config/parse_address.c", + "src/core/ext/client_config/resolver.c", + "src/core/ext/client_config/resolver_factory.c", + "src/core/ext/client_config/resolver_registry.c", + "src/core/ext/client_config/resolver_result.c", + "src/core/ext/client_config/subchannel.c", + "src/core/ext/client_config/subchannel_index.c", + "src/core/ext/client_config/uri_parser.c", + ], + hdrs = [ "src/core/ext/client_config/client_channel.h", "src/core/ext/client_config/client_channel_factory.h", "src/core/ext/client_config/connector.h", @@ -289,6 +610,7 @@ grpc_cc_library( "src/core/ext/client_config/lb_policy.h", "src/core/ext/client_config/lb_policy_factory.h", "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/message_size_filter.h", "src/core/ext/client_config/method_config.h", "src/core/ext/client_config/parse_address.h", "src/core/ext/client_config/resolver.h", @@ -298,117 +620,179 @@ grpc_cc_library( "src/core/ext/client_config/subchannel.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + ], + deps = [ + "grpc_base", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_codegen", + public_hdrs = [ + "include/grpc/impl/codegen/byte_buffer_reader.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + ], + deps = [ + "gpr_codegen", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_lb_policy_grpclb", + srcs = [ + "src/core/ext/lb_policy/grpclb/grpclb.c", + "src/core/ext/lb_policy/grpclb/load_balancer_api.c", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", + ], + hdrs = [ "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", + ], + external_deps = [ + "nanopb", + ], + deps = [ + "grpc_base", + "grpc_client_config", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_lb_policy_pick_first", + srcs = [ + "src/core/ext/lb_policy/pick_first/pick_first.c", + ], + deps = [ + "grpc_base", + "grpc_client_config", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_lb_policy_round_robin", + srcs = [ + "src/core/ext/lb_policy/round_robin/round_robin.c", + ], + deps = [ + "grpc_base", + "grpc_client_config", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_load_reporting", + srcs = [ + "src/core/ext/load_reporting/load_reporting.c", + "src/core/ext/load_reporting/load_reporting_filter.c", + ], + hdrs = [ "src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting_filter.h", - "src/core/ext/census/aggregation.h", - "src/core/ext/census/base_resources.h", - "src/core/ext/census/census_interface.h", - "src/core/ext/census/census_rpc_stats.h", - "src/core/ext/census/gen/census.pb.h", - "src/core/ext/census/gen/trace_context.pb.h", - "src/core/ext/census/grpc_filter.h", - "src/core/ext/census/mlog.h", - "src/core/ext/census/resource.h", - "src/core/ext/census/rpc_metric_id.h", - "src/core/ext/census/trace_context.h", - "src/core/lib/surface/init.c", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", + ], + deps = [ + "grpc_base", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_resolver_dns_native", + srcs = [ + "src/core/ext/resolver/dns/native/dns_resolver.c", + ], + deps = [ + "grpc_base", + "grpc_client_config", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_resolver_sockaddr", + srcs = [ + "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", + ], + deps = [ + "grpc_base", + "grpc_client_config", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_secure", + srcs = [ + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/security/context/security_context.c", + "src/core/lib/security/credentials/composite/composite_credentials.c", + "src/core/lib/security/credentials/credentials.c", + "src/core/lib/security/credentials/credentials_metadata.c", + "src/core/lib/security/credentials/fake/fake_credentials.c", + "src/core/lib/security/credentials/google_default/credentials_posix.c", + "src/core/lib/security/credentials/google_default/credentials_windows.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.c", + "src/core/lib/security/credentials/iam/iam_credentials.c", + "src/core/lib/security/credentials/jwt/json_token.c", + "src/core/lib/security/credentials/jwt/jwt_credentials.c", + "src/core/lib/security/credentials/jwt/jwt_verifier.c", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", + "src/core/lib/security/credentials/plugin/plugin_credentials.c", + "src/core/lib/security/credentials/ssl/ssl_credentials.c", + "src/core/lib/security/transport/client_auth_filter.c", + "src/core/lib/security/transport/handshake.c", + "src/core/lib/security/transport/secure_endpoint.c", + "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/transport/tsi_error.c", + "src/core/lib/security/util/b64.c", + "src/core/lib/security/util/json_util.c", + "src/core/lib/surface/init_secure.c", + ], + hdrs = [ + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/tsi_error.h", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.h", + ], + public_hdrs = [ + "include/grpc/grpc_security.h", + ], + deps = [ + "grpc_base", + "grpc_transport_chttp2_alpn", + "tsi", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_transport_chttp2", + srcs = [ "src/core/ext/transport/chttp2/transport/bin_decoder.c", "src/core/ext/transport/chttp2/transport/bin_encoder.c", "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", @@ -430,144 +814,152 @@ grpc_cc_library( "src/core/ext/transport/chttp2/transport/stream_map.c", "src/core/ext/transport/chttp2/transport/varint.c", "src/core/ext/transport/chttp2/transport/writing.c", + ], + hdrs = [ + "src/core/ext/transport/chttp2/transport/bin_decoder.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/varint.h", + ], + deps = [ + "grpc_base", + "grpc_transport_chttp2_alpn", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_transport_chttp2_alpn", + srcs = [ "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", + ], + hdrs = [ + "src/core/ext/transport/chttp2/alpn/alpn.h", + ], + deps = [ + "gpr", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_transport_chttp2_client_insecure", + srcs = [ + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", + ], + deps = [ + "grpc_transport_chttp2", + "grpc_base", + "grpc_client_config", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_transport_chttp2_client_secure", + srcs = [ "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", + ], + deps = [ + "grpc_transport_chttp2", + "grpc_base", + "grpc_client_config", + "grpc_secure", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_transport_chttp2_server_insecure", + srcs = [ "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - "src/core/ext/lb_policy/grpclb/grpclb.c", - "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", - "src/core/ext/lb_policy/pick_first/pick_first.c", - "src/core/ext/lb_policy/round_robin/round_robin.c", - "src/core/ext/resolver/dns/native/dns_resolver.c", - "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", - "src/core/ext/load_reporting/load_reporting.c", - "src/core/ext/load_reporting/load_reporting_filter.c", - "src/core/ext/census/base_resources.c", - "src/core/ext/census/context.c", - "src/core/ext/census/gen/census.pb.c", - "src/core/ext/census/gen/trace_context.pb.c", - "src/core/ext/census/grpc_context.c", - "src/core/ext/census/grpc_filter.c", - "src/core/ext/census/grpc_plugin.c", - "src/core/ext/census/initialize.c", - "src/core/ext/census/mlog.c", - "src/core/ext/census/operation.c", - "src/core/ext/census/placeholders.c", - "src/core/ext/census/resource.c", - "src/core/ext/census/trace_context.c", - "src/core/ext/census/tracing.c", - "src/core/plugin_registry/grpc_plugin_registry.c", + ], + deps = [ + "grpc_transport_chttp2", + "grpc_base", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_transport_chttp2_server_secure", + srcs = [ + "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", + ], + deps = [ + "grpc_transport_chttp2", + "grpc_base", + "grpc_secure", + ], + language = "c", +) + +grpc_cc_library( + name = "grpc_transport_cronet_client_secure", + srcs = [ + "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", + "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", + "src/core/ext/transport/cronet/transport/cronet_transport.c", ], hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", + "third_party/objective_c/Cronet/cronet_c_for_grpc.h", + ], + public_hdrs = [ + "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", - "include/grpc/census.h", + "include/grpc/grpc_security_constants.h", + ], + deps = [ + "grpc_base", + "grpc_transport_chttp2", + ], + language = "c", +) + +grpc_cc_library( + name = "tsi", + srcs = [ + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/transport_security.c", + ], + hdrs = [ + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", ], external_deps = [ "libssl", - "zlib", - "nanopb", ], deps = [ - ":gpr", + "gpr", ], - language = "C", + language = "c", ) - grpc_cc_library( - name = "grpc++", + name = "grpc++_base", srcs = [ - "include/grpc++/impl/codegen/core_codegen.h", - "src/cpp/client/secure_credentials.h", - "src/cpp/common/secure_auth_context.h", - "src/cpp/server/secure_server_credentials.h", - "src/cpp/client/create_channel_internal.h", - "src/cpp/common/channel_filter.h", - "src/cpp/server/dynamic_thread_pool.h", - "src/cpp/server/thread_pool_interface.h", - "src/cpp/client/insecure_credentials.cc", - "src/cpp/client/secure_credentials.cc", - "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/secure_auth_context.cc", - "src/cpp/common/secure_channel_arguments.cc", - "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/server/secure_server_credentials.cc", "src/cpp/client/channel_cc.cc", "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", @@ -593,9 +985,14 @@ grpc_cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time_cc.cc", - "src/cpp/codegen/codegen_init.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/thread_pool_interface.h", + ], + public_hdrs = [ "include/grpc++/alarm.h", "include/grpc++/channel.h", "include/grpc++/client_context.h", @@ -643,6 +1040,17 @@ grpc_cc_library( "include/grpc++/support/stub_options.h", "include/grpc++/support/sync_stream.h", "include/grpc++/support/time.h", + ], + deps = [ + "grpc", + "grpc++_codegen_base", + ], + language = "c++", +) + +grpc_cc_library( + name = "grpc++_codegen_base", + public_hdrs = [ "include/grpc++/impl/codegen/async_stream.h", "include/grpc++/impl/codegen/async_unary_call.h", "include/grpc++/impl/codegen/call.h", @@ -674,29 +1082,53 @@ grpc_cc_library( "include/grpc++/impl/codegen/sync_no_cxx11.h", "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", ], - external_deps = [ - "libssl", - "protobuf_clib", + deps = [ + "grpc_codegen", + ], + language = "c++", +) + +grpc_cc_library( + name = "grpc++_codegen_base_src", + srcs = [ + "src/cpp/codegen/codegen_init.cc", + ], + deps = [ + "grpc++_codegen_base", + ], + language = "c++", +) + +grpc_cc_library( + name = "grpc++_codegen_proto", + public_hdrs = [ + "include/grpc++/impl/codegen/proto_utils.h", + ], + deps = [ + "grpc++_codegen_base", + "grpc++_config_proto", + ], + language = "c++", +) + +grpc_cc_library( + name = "grpc++_config_proto", + public_hdrs = [ + "include/grpc++/impl/codegen/config_protobuf.h", + ], + language = "c++", +) + +grpc_cc_library( + name = "thrift_util", + public_hdrs = [ + "include/grpc++/impl/codegen/thrift_serializer.h", + "include/grpc++/impl/codegen/thrift_utils.h", ], deps = [ - ":grpc", + "grpc++_codegen_base", ], + language = "c++", ) + diff --git a/src/core/lib/channel/message_size_filter.c b/src/core/ext/client_config/message_size_filter.c similarity index 100% rename from src/core/lib/channel/message_size_filter.c rename to src/core/ext/client_config/message_size_filter.c diff --git a/src/core/lib/channel/message_size_filter.h b/src/core/ext/client_config/message_size_filter.h similarity index 100% rename from src/core/lib/channel/message_size_filter.h rename to src/core/ext/client_config/message_size_filter.h diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD index a0b10709cec..3a04f97b0fd 100644 --- a/test/core/end2end/BUILD +++ b/test/core/end2end/BUILD @@ -39,6 +39,12 @@ cc_library( cc_library( name = 'ssl_test_data', hdrs = ['data/ssl_test_data.h'], + srcs = [ + "data/client_certs.c", + "data/server1_cert.c", + "data/server1_key.c", + "data/test_root_cert.c", + ] ) cc_library( From 674c66cd3794396a54c73866f2223eb60c5c8b6b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 13:08:52 -0700 Subject: [PATCH 13/23] Bad ssl tests converted --- grpc-build-system.bzl | 2 +- test/core/bad_ssl/BUILD | 32 ++++++++ test/core/bad_ssl/gen_build_yaml.py | 106 --------------------------- test/core/bad_ssl/generate_tests.bzl | 52 +++++++++++++ test/core/end2end/BUILD | 1 + 5 files changed, 86 insertions(+), 107 deletions(-) create mode 100644 test/core/bad_ssl/BUILD delete mode 100755 test/core/bad_ssl/gen_build_yaml.py create mode 100755 test/core/bad_ssl/generate_tests.bzl diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index 187cc3e424d..653d58ef7f2 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -35,7 +35,7 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"): copts = [] - if language == "C": + if language.upper() == "C": copts = ["-std=c99"] native.cc_library( name = name, diff --git a/test/core/bad_ssl/BUILD b/test/core/bad_ssl/BUILD new file mode 100644 index 00000000000..630733dd4d7 --- /dev/null +++ b/test/core/bad_ssl/BUILD @@ -0,0 +1,32 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load(":generate_tests.bzl", "grpc_bad_ssl_tests") + +grpc_bad_ssl_tests() diff --git a/test/core/bad_ssl/gen_build_yaml.py b/test/core/bad_ssl/gen_build_yaml.py deleted file mode 100755 index c17b17eb136..00000000000 --- a/test/core/bad_ssl/gen_build_yaml.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python2.7 -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -"""Generates the appropriate build.json data for all the end2end tests.""" - - -import collections -import yaml - -TestOptions = collections.namedtuple('TestOptions', 'flaky cpu_cost') -default_test_options = TestOptions(False, 1.0) - -# maps test names to options -BAD_CLIENT_TESTS = { - 'cert': default_test_options._replace(cpu_cost=0.1), - # Disabling this test because it does not link correctly as written - # 'alpn': default_test_options._replace(cpu_cost=0.1), -} - -def main(): - json = { - '#': 'generated with test/bad_ssl/gen_build_json.py', - 'libs': [ - { - 'name': 'bad_ssl_test_server', - 'build': 'private', - 'language': 'c', - 'src': ['test/core/bad_ssl/server_common.c'], - 'headers': ['test/core/bad_ssl/server_common.h'], - 'vs_proj_dir': 'test', - 'platforms': ['linux', 'posix', 'mac'], - 'deps': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr' - ] - } - ], - 'targets': [ - { - 'name': 'bad_ssl_%s_server' % t, - 'build': 'test', - 'language': 'c', - 'run': False, - 'src': ['test/core/bad_ssl/servers/%s.c' % t], - 'vs_proj_dir': 'test/bad_ssl', - 'platforms': ['linux', 'posix', 'mac'], - 'deps': [ - 'bad_ssl_test_server', - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr' - ] - } - for t in sorted(BAD_CLIENT_TESTS.keys())] + [ - { - 'name': 'bad_ssl_%s_test' % t, - 'cpu_cost': BAD_CLIENT_TESTS[t].cpu_cost, - 'build': 'test', - 'language': 'c', - 'src': ['test/core/bad_ssl/bad_ssl_test.c'], - 'vs_proj_dir': 'test', - 'platforms': ['linux', 'posix', 'mac'], - 'deps': [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr' - ] - } - for t in sorted(BAD_CLIENT_TESTS.keys())]} - print yaml.dump(json) - - -if __name__ == '__main__': - main() diff --git a/test/core/bad_ssl/generate_tests.bzl b/test/core/bad_ssl/generate_tests.bzl new file mode 100755 index 00000000000..78474bc1cab --- /dev/null +++ b/test/core/bad_ssl/generate_tests.bzl @@ -0,0 +1,52 @@ +#!/usr/bin/env python2.7 +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +def test_options(): + return struct() + + +# maps test names to options +BAD_SSL_TESTS = ['cert', 'alpn'] + +def grpc_bad_ssl_tests(): + native.cc_library( + name = 'bad_ssl_test_server', + srcs = ['server_common.c'], + hdrs = ['server_common.h'], + deps = ['//test/core/util:grpc_test_util', '//:grpc', '//test/core/end2end:ssl_test_data'] + ) + for t in BAD_SSL_TESTS: + native.cc_test( + name = 'bad_ssl_%s_server' % t, + srcs = ['servers/%s.c' % t], + deps = [':bad_ssl_test_server'], + ) + diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD index fd425c3f3a0..bb439fb18d2 100644 --- a/test/core/end2end/BUILD +++ b/test/core/end2end/BUILD @@ -39,6 +39,7 @@ cc_library( cc_library( name = 'ssl_test_data', + visibility = ["//test:__subpackages__"], hdrs = ['data/ssl_test_data.h'], srcs = [ "data/client_certs.c", From 4dba2ea20cb81e1fd1f863ca2c58ab4be7e4fea2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 22:16:37 +0200 Subject: [PATCH 14/23] Moving message_size stuff out of core lib. --- src/core/ext/client_config/message_size_filter.c | 2 +- src/core/lib/surface/init.c | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/core/ext/client_config/message_size_filter.c b/src/core/ext/client_config/message_size_filter.c index 1382f199453..a435ad5543d 100644 --- a/src/core/ext/client_config/message_size_filter.c +++ b/src/core/ext/client_config/message_size_filter.c @@ -29,7 +29,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "src/core/lib/channel/message_size_filter.h" +#include "src/core/ext/client_config/message_size_filter.h" #include #include diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 8ca0643ba7e..2c8f28ee457 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -46,7 +46,6 @@ #include "src/core/lib/channel/deadline_filter.h" #include "src/core/lib/channel/http_client_filter.h" #include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/channel/message_size_filter.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/combiner.h" @@ -106,15 +105,6 @@ static void register_builtin_channel_init() { grpc_channel_init_register_stage( GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter, (void *)&grpc_server_deadline_filter); - grpc_channel_init_register_stage( - GRPC_CLIENT_SUBCHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, - prepend_filter, (void *)&grpc_message_size_filter); - grpc_channel_init_register_stage( - GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, - prepend_filter, (void *)&grpc_message_size_filter); - grpc_channel_init_register_stage( - GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter, - (void *)&grpc_message_size_filter); grpc_channel_init_register_stage( GRPC_CLIENT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, prepend_filter, (void *)&grpc_compress_filter); From d196c8adb3b8ace4bc1a0a0d43c10ce03bf51d7b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 20 Oct 2016 13:22:51 -0700 Subject: [PATCH 15/23] Fixes --- test/core/end2end/BUILD | 5 +++++ test/core/end2end/generate_tests.bzl | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD index bb439fb18d2..681cea1de74 100644 --- a/test/core/end2end/BUILD +++ b/test/core/end2end/BUILD @@ -34,6 +34,7 @@ cc_library( srcs = ['cq_verifier.c'], hdrs = ['cq_verifier.h'], deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'], + copts = ['-std=c99'], visibility = ["//test:__subpackages__"], ) @@ -41,6 +42,7 @@ cc_library( name = 'ssl_test_data', visibility = ["//test:__subpackages__"], hdrs = ['data/ssl_test_data.h'], + copts = ['-std=c99'], srcs = [ "data/client_certs.c", "data/server1_cert.c", @@ -53,6 +55,7 @@ cc_library( name = 'fake_resolver', hdrs = ['fake_resolver.h'], srcs = ['fake_resolver.c'], + copts = ['-std=c99'], deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] ) @@ -60,6 +63,7 @@ cc_library( name = 'http_proxy', hdrs = ['fixtures/http_proxy.h'], srcs = ['fixtures/http_proxy.c'], + copts = ['-std=c99'], deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] ) @@ -67,6 +71,7 @@ cc_library( name = 'proxy', hdrs = ['fixtures/proxy.h'], srcs = ['fixtures/proxy.c'], + copts = ['-std=c99'], deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] ) diff --git a/test/core/end2end/generate_tests.bzl b/test/core/end2end/generate_tests.bzl index d6b0aaa2f4a..aae8b4f7bdb 100755 --- a/test/core/end2end/generate_tests.bzl +++ b/test/core/end2end/generate_tests.bzl @@ -158,6 +158,7 @@ def grpc_end2end_tests(): 'tests/cancel_test_helpers.h', 'end2end_tests.h' ], + copts = ['-std=c99'], deps = [ ':cq_verifier', ':ssl_test_data', @@ -175,6 +176,7 @@ def grpc_end2end_tests(): native.cc_library( name = '%s_test_lib' % f, srcs = ['fixtures/%s.c' % f], + copts = ['-std=c99'], deps = [':end2end_tests'] ) for t, topt in END2END_TESTS.items(): @@ -183,5 +185,5 @@ def grpc_end2end_tests(): native.cc_test( name = '%s_test@%s' % (f, t), args = [t], - deps = [':%s_test_lib' % f] + deps = [':%s_test_lib' % f], ) From d58c375d764c65d699cfd0e4536c3e8f631e8221 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 22:30:16 +0200 Subject: [PATCH 16/23] Buildify. --- BUILD | 1972 ++++++++++++++++++++-------------------- third_party/zlib.BUILD | 69 +- 2 files changed, 1018 insertions(+), 1023 deletions(-) diff --git a/BUILD b/BUILD index b1bbbffb4b2..72301831551 100644 --- a/BUILD +++ b/BUILD @@ -38,1097 +38,1093 @@ package(default_visibility = ["//visibility:public"]) load(":grpc-build-system.bzl", "grpc_cc_library") g_stands_for = "good" + version = "1.1.0-dev" grpc_cc_library( - name = "gpr", - deps = [ - "gpr_base", - ], - language = "c", - standalone = True, + name = "gpr", + language = "c", + standalone = True, + deps = [ + "gpr_base", + ], ) grpc_cc_library( - name = "grpc", - srcs = [ - "src/core/lib/surface/init.c", - "src/core/plugin_registry/grpc_plugin_registry.c", - ], - deps = [ - "grpc_base", - "grpc_transport_chttp2_server_secure", - "grpc_transport_chttp2_client_secure", - "grpc_transport_chttp2_server_insecure", - "grpc_transport_chttp2_client_insecure", - "grpc_lb_policy_grpclb", - "grpc_lb_policy_pick_first", - "grpc_lb_policy_round_robin", - "grpc_resolver_dns_native", - "grpc_resolver_sockaddr", - "grpc_load_reporting", - "grpc_secure", - "census", - ], - language = "c", - standalone = True, + 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_lb_policy_grpclb", + "grpc_lb_policy_pick_first", + "grpc_lb_policy_round_robin", + "grpc_load_reporting", + "grpc_resolver_dns_native", + "grpc_resolver_sockaddr", + "grpc_secure", + "grpc_transport_chttp2_client_insecure", + "grpc_transport_chttp2_client_secure", + "grpc_transport_chttp2_server_insecure", + "grpc_transport_chttp2_server_secure", + ], ) grpc_cc_library( - name = "grpc_cronet", - srcs = [ - "src/core/lib/surface/init.c", - "src/core/plugin_registry/grpc_cronet_plugin_registry.c", - ], - deps = [ - "grpc_base", - "grpc_transport_cronet_client_secure", - "grpc_transport_chttp2_client_secure", - ], - language = "c", + name = "grpc_cronet", + srcs = [ + "src/core/lib/surface/init.c", + "src/core/plugin_registry/grpc_cronet_plugin_registry.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_transport_chttp2_client_secure", + "grpc_transport_cronet_client_secure", + ], ) grpc_cc_library( - name = "grpc_unsecure", - srcs = [ - "src/core/lib/surface/init.c", - "src/core/lib/surface/init_unsecure.c", - "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", - ], - deps = [ - "grpc_base", - "grpc_transport_chttp2_server_insecure", - "grpc_transport_chttp2_client_insecure", - "grpc_resolver_dns_native", - "grpc_resolver_sockaddr", - "grpc_load_reporting", - "grpc_lb_policy_grpclb", - "grpc_lb_policy_pick_first", - "grpc_lb_policy_round_robin", - "census", - ], - language = "c", - standalone = True, + name = "grpc_unsecure", + srcs = [ + "src/core/lib/surface/init.c", + "src/core/lib/surface/init_unsecure.c", + "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", + ], + language = "c", + standalone = True, + deps = [ + "census", + "grpc_base", + "grpc_lb_policy_grpclb", + "grpc_lb_policy_pick_first", + "grpc_lb_policy_round_robin", + "grpc_load_reporting", + "grpc_resolver_dns_native", + "grpc_resolver_sockaddr", + "grpc_transport_chttp2_client_insecure", + "grpc_transport_chttp2_server_insecure", + ], ) grpc_cc_library( - name = "grpc++", - srcs = [ - "src/cpp/client/insecure_credentials.cc", - "src/cpp/client/secure_credentials.cc", - "src/cpp/common/auth_property_iterator.cc", - "src/cpp/common/secure_auth_context.cc", - "src/cpp/common/secure_channel_arguments.cc", - "src/cpp/common/secure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - "src/cpp/server/secure_server_credentials.cc", - ], - hdrs = [ - "include/grpc++/impl/codegen/core_codegen.h", - "src/cpp/client/secure_credentials.h", - "src/cpp/common/secure_auth_context.h", - "src/cpp/server/secure_server_credentials.h", - ], - deps = [ - "gpr", - "grpc", - "grpc++_base", - "grpc++_codegen_base", - "grpc++_codegen_base_src", - ], - language = "c++", - standalone = True, + name = "grpc++", + srcs = [ + "src/cpp/client/insecure_credentials.cc", + "src/cpp/client/secure_credentials.cc", + "src/cpp/common/auth_property_iterator.cc", + "src/cpp/common/secure_auth_context.cc", + "src/cpp/common/secure_channel_arguments.cc", + "src/cpp/common/secure_create_auth_context.cc", + "src/cpp/server/insecure_server_credentials.cc", + "src/cpp/server/secure_server_credentials.cc", + ], + hdrs = [ + "include/grpc++/impl/codegen/core_codegen.h", + "src/cpp/client/secure_credentials.h", + "src/cpp/common/secure_auth_context.h", + "src/cpp/server/secure_server_credentials.h", + ], + language = "c++", + standalone = True, + deps = [ + "gpr", + "grpc", + "grpc++_base", + "grpc++_codegen_base", + "grpc++_codegen_base_src", + ], ) grpc_cc_library( - name = "grpc++_unsecure", - srcs = [ - "src/cpp/client/insecure_credentials.cc", - "src/cpp/common/insecure_create_auth_context.cc", - "src/cpp/server/insecure_server_credentials.cc", - ], - hdrs = [ - ], - public_hdrs = [ - ], - deps = [ - "gpr", - "grpc_unsecure", - "grpc++_base", - "grpc++_codegen_base", - "grpc++_codegen_base_src", - ], - language = "c++", - standalone = True, + name = "grpc++_unsecure", + srcs = [ + "src/cpp/client/insecure_credentials.cc", + "src/cpp/common/insecure_create_auth_context.cc", + "src/cpp/server/insecure_server_credentials.cc", + ], + language = "c++", + standalone = True, + deps = [ + "gpr", + "grpc++_base", + "grpc++_codegen_base", + "grpc++_codegen_base_src", + "grpc_unsecure", + ], ) grpc_cc_library( - name = "grpc_plugin_support", - srcs = [ - "src/compiler/cpp_generator.cc", - "src/compiler/csharp_generator.cc", - "src/compiler/node_generator.cc", - "src/compiler/objective_c_generator.cc", - "src/compiler/php_generator.cc", - "src/compiler/python_generator.cc", - "src/compiler/ruby_generator.cc", - ], - hdrs = [ - "src/compiler/config.h", - "src/compiler/cpp_generator.h", - "src/compiler/cpp_generator_helpers.h", - "src/compiler/csharp_generator.h", - "src/compiler/csharp_generator_helpers.h", - "src/compiler/generator_helpers.h", - "src/compiler/node_generator.h", - "src/compiler/node_generator_helpers.h", - "src/compiler/objective_c_generator.h", - "src/compiler/objective_c_generator_helpers.h", - "src/compiler/php_generator.h", - "src/compiler/php_generator_helpers.h", - "src/compiler/python_generator.h", - "src/compiler/ruby_generator.h", - "src/compiler/ruby_generator_helpers-inl.h", - "src/compiler/ruby_generator_map-inl.h", - "src/compiler/ruby_generator_string-inl.h", - ], - external_deps = [ - "protobuf_compiler", - ], - deps = [ - "grpc++_config_proto", - ], - language = "c++", + name = "grpc_plugin_support", + srcs = [ + "src/compiler/cpp_generator.cc", + "src/compiler/csharp_generator.cc", + "src/compiler/node_generator.cc", + "src/compiler/objective_c_generator.cc", + "src/compiler/php_generator.cc", + "src/compiler/python_generator.cc", + "src/compiler/ruby_generator.cc", + ], + hdrs = [ + "src/compiler/config.h", + "src/compiler/cpp_generator.h", + "src/compiler/cpp_generator_helpers.h", + "src/compiler/csharp_generator.h", + "src/compiler/csharp_generator_helpers.h", + "src/compiler/generator_helpers.h", + "src/compiler/node_generator.h", + "src/compiler/node_generator_helpers.h", + "src/compiler/objective_c_generator.h", + "src/compiler/objective_c_generator_helpers.h", + "src/compiler/php_generator.h", + "src/compiler/php_generator_helpers.h", + "src/compiler/python_generator.h", + "src/compiler/ruby_generator.h", + "src/compiler/ruby_generator_helpers-inl.h", + "src/compiler/ruby_generator_map-inl.h", + "src/compiler/ruby_generator_string-inl.h", + ], + external_deps = [ + "protobuf_compiler", + ], + language = "c++", + deps = [ + "grpc++_config_proto", + ], ) grpc_cc_library( - name = "grpc_csharp_ext", - srcs = [ - "src/csharp/ext/grpc_csharp_ext.c", - ], - deps = [ - "grpc", - "gpr", - ], - language = "csharp", + name = "grpc_csharp_ext", + srcs = [ + "src/csharp/ext/grpc_csharp_ext.c", + ], + language = "csharp", + deps = [ + "gpr", + "grpc", + ], ) grpc_cc_library( - name = "census", - srcs = [ - "src/core/ext/census/base_resources.c", - "src/core/ext/census/context.c", - "src/core/ext/census/gen/census.pb.c", - "src/core/ext/census/gen/trace_context.pb.c", - "src/core/ext/census/grpc_context.c", - "src/core/ext/census/grpc_filter.c", - "src/core/ext/census/grpc_plugin.c", - "src/core/ext/census/initialize.c", - "src/core/ext/census/mlog.c", - "src/core/ext/census/operation.c", - "src/core/ext/census/placeholders.c", - "src/core/ext/census/resource.c", - "src/core/ext/census/trace_context.c", - "src/core/ext/census/tracing.c", - ], - hdrs = [ - "src/core/ext/census/aggregation.h", - "src/core/ext/census/base_resources.h", - "src/core/ext/census/census_interface.h", - "src/core/ext/census/census_rpc_stats.h", - "src/core/ext/census/gen/census.pb.h", - "src/core/ext/census/gen/trace_context.pb.h", - "src/core/ext/census/grpc_filter.h", - "src/core/ext/census/mlog.h", - "src/core/ext/census/resource.h", - "src/core/ext/census/rpc_metric_id.h", - "src/core/ext/census/trace_context.h", - ], - public_hdrs = [ - "include/grpc/census.h", - ], - external_deps = [ - "nanopb", - ], - deps = [ - "grpc_base", - ], - language = "c", + name = "census", + srcs = [ + "src/core/ext/census/base_resources.c", + "src/core/ext/census/context.c", + "src/core/ext/census/gen/census.pb.c", + "src/core/ext/census/gen/trace_context.pb.c", + "src/core/ext/census/grpc_context.c", + "src/core/ext/census/grpc_filter.c", + "src/core/ext/census/grpc_plugin.c", + "src/core/ext/census/initialize.c", + "src/core/ext/census/mlog.c", + "src/core/ext/census/operation.c", + "src/core/ext/census/placeholders.c", + "src/core/ext/census/resource.c", + "src/core/ext/census/trace_context.c", + "src/core/ext/census/tracing.c", + ], + hdrs = [ + "src/core/ext/census/aggregation.h", + "src/core/ext/census/base_resources.h", + "src/core/ext/census/census_interface.h", + "src/core/ext/census/census_rpc_stats.h", + "src/core/ext/census/gen/census.pb.h", + "src/core/ext/census/gen/trace_context.pb.h", + "src/core/ext/census/grpc_filter.h", + "src/core/ext/census/mlog.h", + "src/core/ext/census/resource.h", + "src/core/ext/census/rpc_metric_id.h", + "src/core/ext/census/trace_context.h", + ], + external_deps = [ + "nanopb", + ], + language = "c", + public_hdrs = [ + "include/grpc/census.h", + ], + deps = [ + "grpc_base", + ], ) grpc_cc_library( - name = "gpr_base", - srcs = [ - "src/core/lib/profiling/basic_timers.c", - "src/core/lib/profiling/stap_timers.c", - "src/core/lib/support/alloc.c", - "src/core/lib/support/avl.c", - "src/core/lib/support/backoff.c", - "src/core/lib/support/cmdline.c", - "src/core/lib/support/cpu_iphone.c", - "src/core/lib/support/cpu_linux.c", - "src/core/lib/support/cpu_posix.c", - "src/core/lib/support/cpu_windows.c", - "src/core/lib/support/env_linux.c", - "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_windows.c", - "src/core/lib/support/histogram.c", - "src/core/lib/support/host_port.c", - "src/core/lib/support/log.c", - "src/core/lib/support/log_android.c", - "src/core/lib/support/log_linux.c", - "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_windows.c", - "src/core/lib/support/mpscq.c", - "src/core/lib/support/murmur_hash.c", - "src/core/lib/support/percent_encoding.c", - "src/core/lib/support/slice.c", - "src/core/lib/support/slice_buffer.c", - "src/core/lib/support/stack_lockfree.c", - "src/core/lib/support/string.c", - "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_util_windows.c", - "src/core/lib/support/string_windows.c", - "src/core/lib/support/subprocess_posix.c", - "src/core/lib/support/subprocess_windows.c", - "src/core/lib/support/sync.c", - "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_windows.c", - "src/core/lib/support/thd.c", - "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_windows.c", - "src/core/lib/support/time.c", - "src/core/lib/support/time_posix.c", - "src/core/lib/support/time_precise.c", - "src/core/lib/support/time_windows.c", - "src/core/lib/support/tls_pthread.c", - "src/core/lib/support/tmpfile_msys.c", - "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_windows.c", - "src/core/lib/support/wrap_memcpy.c", - ], - hdrs = [ - "src/core/lib/profiling/timers.h", - "src/core/lib/support/backoff.h", - "src/core/lib/support/block_annotate.h", - "src/core/lib/support/env.h", - "src/core/lib/support/mpscq.h", - "src/core/lib/support/murmur_hash.h", - "src/core/lib/support/percent_encoding.h", - "src/core/lib/support/stack_lockfree.h", - "src/core/lib/support/string.h", - "src/core/lib/support/string_windows.h", - "src/core/lib/support/thd_internal.h", - "src/core/lib/support/time_precise.h", - "src/core/lib/support/tmpfile.h", - ], - public_hdrs = [ - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/atm_gcc_atomic.h", - "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_windows.h", - "include/grpc/support/avl.h", - "include/grpc/support/cmdline.h", - "include/grpc/support/cpu.h", - "include/grpc/support/histogram.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/log_windows.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/subprocess.h", - "include/grpc/support/sync.h", - "include/grpc/support/sync_generic.h", - "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_windows.h", - "include/grpc/support/thd.h", - "include/grpc/support/time.h", - "include/grpc/support/tls.h", - "include/grpc/support/tls_gcc.h", - "include/grpc/support/tls_msvc.h", - "include/grpc/support/tls_pthread.h", - "include/grpc/support/useful.h", - ], - deps = [ - "gpr_codegen", - ], - language = "c", + name = "gpr_base", + srcs = [ + "src/core/lib/profiling/basic_timers.c", + "src/core/lib/profiling/stap_timers.c", + "src/core/lib/support/alloc.c", + "src/core/lib/support/avl.c", + "src/core/lib/support/backoff.c", + "src/core/lib/support/cmdline.c", + "src/core/lib/support/cpu_iphone.c", + "src/core/lib/support/cpu_linux.c", + "src/core/lib/support/cpu_posix.c", + "src/core/lib/support/cpu_windows.c", + "src/core/lib/support/env_linux.c", + "src/core/lib/support/env_posix.c", + "src/core/lib/support/env_windows.c", + "src/core/lib/support/histogram.c", + "src/core/lib/support/host_port.c", + "src/core/lib/support/log.c", + "src/core/lib/support/log_android.c", + "src/core/lib/support/log_linux.c", + "src/core/lib/support/log_posix.c", + "src/core/lib/support/log_windows.c", + "src/core/lib/support/mpscq.c", + "src/core/lib/support/murmur_hash.c", + "src/core/lib/support/percent_encoding.c", + "src/core/lib/support/slice.c", + "src/core/lib/support/slice_buffer.c", + "src/core/lib/support/stack_lockfree.c", + "src/core/lib/support/string.c", + "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_util_windows.c", + "src/core/lib/support/string_windows.c", + "src/core/lib/support/subprocess_posix.c", + "src/core/lib/support/subprocess_windows.c", + "src/core/lib/support/sync.c", + "src/core/lib/support/sync_posix.c", + "src/core/lib/support/sync_windows.c", + "src/core/lib/support/thd.c", + "src/core/lib/support/thd_posix.c", + "src/core/lib/support/thd_windows.c", + "src/core/lib/support/time.c", + "src/core/lib/support/time_posix.c", + "src/core/lib/support/time_precise.c", + "src/core/lib/support/time_windows.c", + "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile_msys.c", + "src/core/lib/support/tmpfile_posix.c", + "src/core/lib/support/tmpfile_windows.c", + "src/core/lib/support/wrap_memcpy.c", + ], + hdrs = [ + "src/core/lib/profiling/timers.h", + "src/core/lib/support/backoff.h", + "src/core/lib/support/block_annotate.h", + "src/core/lib/support/env.h", + "src/core/lib/support/mpscq.h", + "src/core/lib/support/murmur_hash.h", + "src/core/lib/support/percent_encoding.h", + "src/core/lib/support/stack_lockfree.h", + "src/core/lib/support/string.h", + "src/core/lib/support/string_windows.h", + "src/core/lib/support/thd_internal.h", + "src/core/lib/support/time_precise.h", + "src/core/lib/support/tmpfile.h", + ], + language = "c", + public_hdrs = [ + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/atm_gcc_atomic.h", + "include/grpc/support/atm_gcc_sync.h", + "include/grpc/support/atm_windows.h", + "include/grpc/support/avl.h", + "include/grpc/support/cmdline.h", + "include/grpc/support/cpu.h", + "include/grpc/support/histogram.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", + "include/grpc/support/log_windows.h", + "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/subprocess.h", + "include/grpc/support/sync.h", + "include/grpc/support/sync_generic.h", + "include/grpc/support/sync_posix.h", + "include/grpc/support/sync_windows.h", + "include/grpc/support/thd.h", + "include/grpc/support/time.h", + "include/grpc/support/tls.h", + "include/grpc/support/tls_gcc.h", + "include/grpc/support/tls_msvc.h", + "include/grpc/support/tls_pthread.h", + "include/grpc/support/useful.h", + ], + deps = [ + "gpr_codegen", + ], ) grpc_cc_library( - name = "gpr_codegen", - public_hdrs = [ - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_windows.h", - "include/grpc/impl/codegen/gpr_types.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_windows.h", - ], - language = "c", + name = "gpr_codegen", + language = "c", + public_hdrs = [ + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/gpr_types.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_windows.h", + ], ) grpc_cc_library( - name = "grpc_base", - srcs = [ - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/deadline_filter.c", - "src/core/lib/channel/handshaker.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/combiner.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_cv.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/mdstr_hash_table.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/timeout_encoding.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - ], - hdrs = [ - "src/core/lib/channel/channel_args.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/channel_stack_builder.h", - "src/core/lib/channel/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/deadline_filter.h", - "src/core/lib/channel/handshaker.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/combiner.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_cv.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/mdstr_hash_table.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/timeout_encoding.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - ], - public_hdrs = [ - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/grpc_security_constants.h", - "include/grpc/status.h", - ], - external_deps = [ - "zlib", - ], - deps = [ - "grpc_codegen", - "gpr_base", - ], - language = "c", + name = "grpc_base", + srcs = [ + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/deadline_filter.c", + "src/core/lib/channel/handshaker.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/compression/compression.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/combiner.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", + "src/core/lib/iomgr/ev_epoll_linux.c", + "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_posix.c", + "src/core/lib/iomgr/ev_posix.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", + "src/core/lib/iomgr/polling_entity.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_cv.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/mdstr_hash_table.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/timeout_encoding.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", + ], + hdrs = [ + "src/core/lib/channel/channel_args.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/channel_stack_builder.h", + "src/core/lib/channel/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/deadline_filter.h", + "src/core/lib/channel/handshaker.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/combiner.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", + "src/core/lib/iomgr/ev_epoll_linux.h", + "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_posix.h", + "src/core/lib/iomgr/ev_posix.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", + "src/core/lib/iomgr/polling_entity.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_cv.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/mdstr_hash_table.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/timeout_encoding.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + ], + external_deps = [ + "zlib", + ], + language = "c", + public_hdrs = [ + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", + "include/grpc/grpc_security_constants.h", + "include/grpc/status.h", + ], + deps = [ + "gpr_base", + "grpc_codegen", + ], ) grpc_cc_library( - name = "grpc_client_config", - srcs = [ - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", - "src/core/ext/client_config/message_size_filter.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", - ], - hdrs = [ - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", - "src/core/ext/client_config/message_size_filter.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", - ], - deps = [ - "grpc_base", - ], - language = "c", + name = "grpc_client_config", + srcs = [ + "src/core/ext/client_config/channel_connectivity.c", + "src/core/ext/client_config/client_channel.c", + "src/core/ext/client_config/client_channel_factory.c", + "src/core/ext/client_config/client_config_plugin.c", + "src/core/ext/client_config/connector.c", + "src/core/ext/client_config/default_initial_connect_string.c", + "src/core/ext/client_config/http_connect_handshaker.c", + "src/core/ext/client_config/initial_connect_string.c", + "src/core/ext/client_config/lb_policy.c", + "src/core/ext/client_config/lb_policy_factory.c", + "src/core/ext/client_config/lb_policy_registry.c", + "src/core/ext/client_config/message_size_filter.c", + "src/core/ext/client_config/method_config.c", + "src/core/ext/client_config/parse_address.c", + "src/core/ext/client_config/resolver.c", + "src/core/ext/client_config/resolver_factory.c", + "src/core/ext/client_config/resolver_registry.c", + "src/core/ext/client_config/resolver_result.c", + "src/core/ext/client_config/subchannel.c", + "src/core/ext/client_config/subchannel_index.c", + "src/core/ext/client_config/uri_parser.c", + ], + hdrs = [ + "src/core/ext/client_config/client_channel.h", + "src/core/ext/client_config/client_channel_factory.h", + "src/core/ext/client_config/connector.h", + "src/core/ext/client_config/http_connect_handshaker.h", + "src/core/ext/client_config/initial_connect_string.h", + "src/core/ext/client_config/lb_policy.h", + "src/core/ext/client_config/lb_policy_factory.h", + "src/core/ext/client_config/lb_policy_registry.h", + "src/core/ext/client_config/message_size_filter.h", + "src/core/ext/client_config/method_config.h", + "src/core/ext/client_config/parse_address.h", + "src/core/ext/client_config/resolver.h", + "src/core/ext/client_config/resolver_factory.h", + "src/core/ext/client_config/resolver_registry.h", + "src/core/ext/client_config/resolver_result.h", + "src/core/ext/client_config/subchannel.h", + "src/core/ext/client_config/subchannel_index.h", + "src/core/ext/client_config/uri_parser.h", + ], + language = "c", + deps = [ + "grpc_base", + ], ) grpc_cc_library( - name = "grpc_codegen", - public_hdrs = [ - "include/grpc/impl/codegen/byte_buffer_reader.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/status.h", - ], - deps = [ - "gpr_codegen", - ], - language = "c", + name = "grpc_codegen", + language = "c", + public_hdrs = [ + "include/grpc/impl/codegen/byte_buffer_reader.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + ], + deps = [ + "gpr_codegen", + ], ) grpc_cc_library( - name = "grpc_lb_policy_grpclb", - srcs = [ - "src/core/ext/lb_policy/grpclb/grpclb.c", - "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", - ], - hdrs = [ - "src/core/ext/lb_policy/grpclb/grpclb.h", - "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", - ], - external_deps = [ - "nanopb", - ], - deps = [ - "grpc_base", - "grpc_client_config", - ], - language = "c", + name = "grpc_lb_policy_grpclb", + srcs = [ + "src/core/ext/lb_policy/grpclb/grpclb.c", + "src/core/ext/lb_policy/grpclb/load_balancer_api.c", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", + ], + hdrs = [ + "src/core/ext/lb_policy/grpclb/grpclb.h", + "src/core/ext/lb_policy/grpclb/load_balancer_api.h", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", + ], + external_deps = [ + "nanopb", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_client_config", + ], ) grpc_cc_library( - name = "grpc_lb_policy_pick_first", - srcs = [ - "src/core/ext/lb_policy/pick_first/pick_first.c", - ], - deps = [ - "grpc_base", - "grpc_client_config", - ], - language = "c", + name = "grpc_lb_policy_pick_first", + srcs = [ + "src/core/ext/lb_policy/pick_first/pick_first.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_client_config", + ], ) grpc_cc_library( - name = "grpc_lb_policy_round_robin", - srcs = [ - "src/core/ext/lb_policy/round_robin/round_robin.c", - ], - deps = [ - "grpc_base", - "grpc_client_config", - ], - language = "c", + name = "grpc_lb_policy_round_robin", + srcs = [ + "src/core/ext/lb_policy/round_robin/round_robin.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_client_config", + ], ) grpc_cc_library( - name = "grpc_load_reporting", - srcs = [ - "src/core/ext/load_reporting/load_reporting.c", - "src/core/ext/load_reporting/load_reporting_filter.c", - ], - hdrs = [ - "src/core/ext/load_reporting/load_reporting.h", - "src/core/ext/load_reporting/load_reporting_filter.h", - ], - deps = [ - "grpc_base", - ], - language = "c", + name = "grpc_load_reporting", + srcs = [ + "src/core/ext/load_reporting/load_reporting.c", + "src/core/ext/load_reporting/load_reporting_filter.c", + ], + hdrs = [ + "src/core/ext/load_reporting/load_reporting.h", + "src/core/ext/load_reporting/load_reporting_filter.h", + ], + language = "c", + deps = [ + "grpc_base", + ], ) grpc_cc_library( - name = "grpc_resolver_dns_native", - srcs = [ - "src/core/ext/resolver/dns/native/dns_resolver.c", - ], - deps = [ - "grpc_base", - "grpc_client_config", - ], - language = "c", + name = "grpc_resolver_dns_native", + srcs = [ + "src/core/ext/resolver/dns/native/dns_resolver.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_client_config", + ], ) grpc_cc_library( - name = "grpc_resolver_sockaddr", - srcs = [ - "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", - ], - deps = [ - "grpc_base", - "grpc_client_config", - ], - language = "c", + name = "grpc_resolver_sockaddr", + srcs = [ + "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_client_config", + ], ) grpc_cc_library( - name = "grpc_secure", - srcs = [ - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - ], - hdrs = [ - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - ], - public_hdrs = [ - "include/grpc/grpc_security.h", - ], - deps = [ - "grpc_base", - "grpc_transport_chttp2_alpn", - "tsi", - ], - language = "c", + name = "grpc_secure", + srcs = [ + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/security/context/security_context.c", + "src/core/lib/security/credentials/composite/composite_credentials.c", + "src/core/lib/security/credentials/credentials.c", + "src/core/lib/security/credentials/credentials_metadata.c", + "src/core/lib/security/credentials/fake/fake_credentials.c", + "src/core/lib/security/credentials/google_default/credentials_posix.c", + "src/core/lib/security/credentials/google_default/credentials_windows.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.c", + "src/core/lib/security/credentials/iam/iam_credentials.c", + "src/core/lib/security/credentials/jwt/json_token.c", + "src/core/lib/security/credentials/jwt/jwt_credentials.c", + "src/core/lib/security/credentials/jwt/jwt_verifier.c", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", + "src/core/lib/security/credentials/plugin/plugin_credentials.c", + "src/core/lib/security/credentials/ssl/ssl_credentials.c", + "src/core/lib/security/transport/client_auth_filter.c", + "src/core/lib/security/transport/handshake.c", + "src/core/lib/security/transport/secure_endpoint.c", + "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/transport/tsi_error.c", + "src/core/lib/security/util/b64.c", + "src/core/lib/security/util/json_util.c", + "src/core/lib/surface/init_secure.c", + ], + hdrs = [ + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/tsi_error.h", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.h", + ], + language = "c", + public_hdrs = [ + "include/grpc/grpc_security.h", + ], + deps = [ + "grpc_base", + "grpc_transport_chttp2_alpn", + "tsi", + ], ) grpc_cc_library( - name = "grpc_transport_chttp2", - srcs = [ - "src/core/ext/transport/chttp2/transport/bin_decoder.c", - "src/core/ext/transport/chttp2/transport/bin_encoder.c", - "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", - "src/core/ext/transport/chttp2/transport/chttp2_transport.c", - "src/core/ext/transport/chttp2/transport/frame_data.c", - "src/core/ext/transport/chttp2/transport/frame_goaway.c", - "src/core/ext/transport/chttp2/transport/frame_ping.c", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", - "src/core/ext/transport/chttp2/transport/frame_settings.c", - "src/core/ext/transport/chttp2/transport/frame_window_update.c", - "src/core/ext/transport/chttp2/transport/hpack_encoder.c", - "src/core/ext/transport/chttp2/transport/hpack_parser.c", - "src/core/ext/transport/chttp2/transport/hpack_table.c", - "src/core/ext/transport/chttp2/transport/huffsyms.c", - "src/core/ext/transport/chttp2/transport/incoming_metadata.c", - "src/core/ext/transport/chttp2/transport/parsing.c", - "src/core/ext/transport/chttp2/transport/status_conversion.c", - "src/core/ext/transport/chttp2/transport/stream_lists.c", - "src/core/ext/transport/chttp2/transport/stream_map.c", - "src/core/ext/transport/chttp2/transport/varint.c", - "src/core/ext/transport/chttp2/transport/writing.c", - ], - hdrs = [ - "src/core/ext/transport/chttp2/transport/bin_decoder.h", - "src/core/ext/transport/chttp2/transport/bin_encoder.h", - "src/core/ext/transport/chttp2/transport/chttp2_transport.h", - "src/core/ext/transport/chttp2/transport/frame.h", - "src/core/ext/transport/chttp2/transport/frame_data.h", - "src/core/ext/transport/chttp2/transport/frame_goaway.h", - "src/core/ext/transport/chttp2/transport/frame_ping.h", - "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", - "src/core/ext/transport/chttp2/transport/frame_settings.h", - "src/core/ext/transport/chttp2/transport/frame_window_update.h", - "src/core/ext/transport/chttp2/transport/hpack_encoder.h", - "src/core/ext/transport/chttp2/transport/hpack_parser.h", - "src/core/ext/transport/chttp2/transport/hpack_table.h", - "src/core/ext/transport/chttp2/transport/http2_errors.h", - "src/core/ext/transport/chttp2/transport/huffsyms.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/chttp2/transport/internal.h", - "src/core/ext/transport/chttp2/transport/status_conversion.h", - "src/core/ext/transport/chttp2/transport/stream_map.h", - "src/core/ext/transport/chttp2/transport/varint.h", - ], - deps = [ - "grpc_base", - "grpc_transport_chttp2_alpn", - ], - language = "c", + name = "grpc_transport_chttp2", + srcs = [ + "src/core/ext/transport/chttp2/transport/bin_decoder.c", + "src/core/ext/transport/chttp2/transport/bin_encoder.c", + "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", + "src/core/ext/transport/chttp2/transport/chttp2_transport.c", + "src/core/ext/transport/chttp2/transport/frame_data.c", + "src/core/ext/transport/chttp2/transport/frame_goaway.c", + "src/core/ext/transport/chttp2/transport/frame_ping.c", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.c", + "src/core/ext/transport/chttp2/transport/frame_settings.c", + "src/core/ext/transport/chttp2/transport/frame_window_update.c", + "src/core/ext/transport/chttp2/transport/hpack_encoder.c", + "src/core/ext/transport/chttp2/transport/hpack_parser.c", + "src/core/ext/transport/chttp2/transport/hpack_table.c", + "src/core/ext/transport/chttp2/transport/huffsyms.c", + "src/core/ext/transport/chttp2/transport/incoming_metadata.c", + "src/core/ext/transport/chttp2/transport/parsing.c", + "src/core/ext/transport/chttp2/transport/status_conversion.c", + "src/core/ext/transport/chttp2/transport/stream_lists.c", + "src/core/ext/transport/chttp2/transport/stream_map.c", + "src/core/ext/transport/chttp2/transport/varint.c", + "src/core/ext/transport/chttp2/transport/writing.c", + ], + hdrs = [ + "src/core/ext/transport/chttp2/transport/bin_decoder.h", + "src/core/ext/transport/chttp2/transport/bin_encoder.h", + "src/core/ext/transport/chttp2/transport/chttp2_transport.h", + "src/core/ext/transport/chttp2/transport/frame.h", + "src/core/ext/transport/chttp2/transport/frame_data.h", + "src/core/ext/transport/chttp2/transport/frame_goaway.h", + "src/core/ext/transport/chttp2/transport/frame_ping.h", + "src/core/ext/transport/chttp2/transport/frame_rst_stream.h", + "src/core/ext/transport/chttp2/transport/frame_settings.h", + "src/core/ext/transport/chttp2/transport/frame_window_update.h", + "src/core/ext/transport/chttp2/transport/hpack_encoder.h", + "src/core/ext/transport/chttp2/transport/hpack_parser.h", + "src/core/ext/transport/chttp2/transport/hpack_table.h", + "src/core/ext/transport/chttp2/transport/http2_errors.h", + "src/core/ext/transport/chttp2/transport/huffsyms.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/ext/transport/chttp2/transport/internal.h", + "src/core/ext/transport/chttp2/transport/status_conversion.h", + "src/core/ext/transport/chttp2/transport/stream_map.h", + "src/core/ext/transport/chttp2/transport/varint.h", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_transport_chttp2_alpn", + ], ) grpc_cc_library( - name = "grpc_transport_chttp2_alpn", - srcs = [ - "src/core/ext/transport/chttp2/alpn/alpn.c", - ], - hdrs = [ - "src/core/ext/transport/chttp2/alpn/alpn.h", - ], - deps = [ - "gpr", - ], - language = "c", + name = "grpc_transport_chttp2_alpn", + srcs = [ + "src/core/ext/transport/chttp2/alpn/alpn.c", + ], + hdrs = [ + "src/core/ext/transport/chttp2/alpn/alpn.h", + ], + language = "c", + deps = [ + "gpr", + ], ) grpc_cc_library( - name = "grpc_transport_chttp2_client_insecure", - srcs = [ - "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", - ], - deps = [ - "grpc_transport_chttp2", - "grpc_base", - "grpc_client_config", - ], - language = "c", + name = "grpc_transport_chttp2_client_insecure", + srcs = [ + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_client_config", + "grpc_transport_chttp2", + ], ) grpc_cc_library( - name = "grpc_transport_chttp2_client_secure", - srcs = [ - "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", - ], - deps = [ - "grpc_transport_chttp2", - "grpc_base", - "grpc_client_config", - "grpc_secure", - ], - language = "c", + name = "grpc_transport_chttp2_client_secure", + srcs = [ + "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_client_config", + "grpc_secure", + "grpc_transport_chttp2", + ], ) grpc_cc_library( - name = "grpc_transport_chttp2_server_insecure", - srcs = [ - "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", - "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", - ], - deps = [ - "grpc_transport_chttp2", - "grpc_base", - ], - language = "c", + name = "grpc_transport_chttp2_server_insecure", + srcs = [ + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_transport_chttp2", + ], ) grpc_cc_library( - name = "grpc_transport_chttp2_server_secure", - srcs = [ - "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", - ], - deps = [ - "grpc_transport_chttp2", - "grpc_base", - "grpc_secure", - ], - language = "c", + name = "grpc_transport_chttp2_server_secure", + srcs = [ + "src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c", + ], + language = "c", + deps = [ + "grpc_base", + "grpc_secure", + "grpc_transport_chttp2", + ], ) grpc_cc_library( - name = "grpc_transport_cronet_client_secure", - srcs = [ - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", - ], - hdrs = [ - "third_party/objective_c/Cronet/cronet_c_for_grpc.h", - ], - public_hdrs = [ - "include/grpc/grpc_cronet.h", - "include/grpc/grpc_security.h", - "include/grpc/grpc_security_constants.h", - ], - deps = [ - "grpc_base", - "grpc_transport_chttp2", - ], - language = "c", + name = "grpc_transport_cronet_client_secure", + srcs = [ + "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", + "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", + "src/core/ext/transport/cronet/transport/cronet_transport.c", + ], + hdrs = [ + "third_party/objective_c/Cronet/cronet_c_for_grpc.h", + ], + language = "c", + public_hdrs = [ + "include/grpc/grpc_cronet.h", + "include/grpc/grpc_security.h", + "include/grpc/grpc_security_constants.h", + ], + deps = [ + "grpc_base", + "grpc_transport_chttp2", + ], ) grpc_cc_library( - name = "tsi", - srcs = [ - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", - ], - hdrs = [ - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", - ], - external_deps = [ - "libssl", - ], - deps = [ - "gpr", - ], - language = "c", + name = "tsi", + srcs = [ + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/transport_security.c", + ], + hdrs = [ + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", + ], + external_deps = [ + "libssl", + ], + language = "c", + deps = [ + "gpr", + ], ) grpc_cc_library( - name = "grpc++_base", - 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/rpc_method.cc", - "src/cpp/server/async_generic_service.cc", - "src/cpp/server/create_default_thread_pool.cc", - "src/cpp/server/dynamic_thread_pool.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/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/thread_pool_interface.h", - ], - 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++/generic/async_generic_service.h", - "include/grpc++/generic/generic_stub.h", - "include/grpc++/grpc++.h", - "include/grpc++/impl/call.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.h", - "include/grpc++/impl/sync_cxx11.h", - "include/grpc++/impl/sync_no_cxx11.h", - "include/grpc++/impl/thd.h", - "include/grpc++/impl/thd_cxx11.h", - "include/grpc++/impl/thd_no_cxx11.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", - "grpc++_codegen_base", - ], - language = "c++", + name = "grpc++_base", + 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/rpc_method.cc", + "src/cpp/server/async_generic_service.cc", + "src/cpp/server/create_default_thread_pool.cc", + "src/cpp/server/dynamic_thread_pool.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/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/thread_pool_interface.h", + ], + language = "c++", + 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++/generic/async_generic_service.h", + "include/grpc++/generic/generic_stub.h", + "include/grpc++/grpc++.h", + "include/grpc++/impl/call.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.h", + "include/grpc++/impl/sync_cxx11.h", + "include/grpc++/impl/sync_no_cxx11.h", + "include/grpc++/impl/thd.h", + "include/grpc++/impl/thd_cxx11.h", + "include/grpc++/impl/thd_no_cxx11.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", + "grpc++_codegen_base", + ], ) grpc_cc_library( - name = "grpc++_codegen_base", - public_hdrs = [ - "include/grpc++/impl/codegen/async_stream.h", - "include/grpc++/impl/codegen/async_unary_call.h", - "include/grpc++/impl/codegen/call.h", - "include/grpc++/impl/codegen/call_hook.h", - "include/grpc++/impl/codegen/channel_interface.h", - "include/grpc++/impl/codegen/client_context.h", - "include/grpc++/impl/codegen/client_unary_call.h", - "include/grpc++/impl/codegen/completion_queue.h", - "include/grpc++/impl/codegen/completion_queue_tag.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/core_codegen_interface.h", - "include/grpc++/impl/codegen/create_auth_context.h", - "include/grpc++/impl/codegen/grpc_library.h", - "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/rpc_method.h", - "include/grpc++/impl/codegen/rpc_service_method.h", - "include/grpc++/impl/codegen/security/auth_context.h", - "include/grpc++/impl/codegen/serialization_traits.h", - "include/grpc++/impl/codegen/server_context.h", - "include/grpc++/impl/codegen/server_interface.h", - "include/grpc++/impl/codegen/service_type.h", - "include/grpc++/impl/codegen/status.h", - "include/grpc++/impl/codegen/status_code_enum.h", - "include/grpc++/impl/codegen/status_helper.h", - "include/grpc++/impl/codegen/string_ref.h", - "include/grpc++/impl/codegen/stub_options.h", - "include/grpc++/impl/codegen/sync.h", - "include/grpc++/impl/codegen/sync_cxx11.h", - "include/grpc++/impl/codegen/sync_no_cxx11.h", - "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - ], - deps = [ - "grpc_codegen", - ], - language = "c++", + name = "grpc++_codegen_base", + language = "c++", + public_hdrs = [ + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/create_auth_context.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/status_helper.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + ], + deps = [ + "grpc_codegen", + ], ) grpc_cc_library( - name = "grpc++_codegen_base_src", - srcs = [ - "src/cpp/codegen/codegen_init.cc", - ], - deps = [ - "grpc++_codegen_base", - ], - language = "c++", + name = "grpc++_codegen_base_src", + srcs = [ + "src/cpp/codegen/codegen_init.cc", + ], + language = "c++", + deps = [ + "grpc++_codegen_base", + ], ) grpc_cc_library( - name = "grpc++_codegen_proto", - public_hdrs = [ - "include/grpc++/impl/codegen/proto_utils.h", - ], - deps = [ - "grpc++_codegen_base", - "grpc++_config_proto", - ], - language = "c++", + name = "grpc++_codegen_proto", + language = "c++", + public_hdrs = [ + "include/grpc++/impl/codegen/proto_utils.h", + ], + deps = [ + "grpc++_codegen_base", + "grpc++_config_proto", + ], ) grpc_cc_library( - name = "grpc++_config_proto", - public_hdrs = [ - "include/grpc++/impl/codegen/config_protobuf.h", - ], - language = "c++", + name = "grpc++_config_proto", + language = "c++", + public_hdrs = [ + "include/grpc++/impl/codegen/config_protobuf.h", + ], ) grpc_cc_library( - name = "thrift_util", - public_hdrs = [ - "include/grpc++/impl/codegen/thrift_serializer.h", - "include/grpc++/impl/codegen/thrift_utils.h", - ], - deps = [ - "grpc++_codegen_base", - ], - language = "c++", + name = "thrift_util", + language = "c++", + public_hdrs = [ + "include/grpc++/impl/codegen/thrift_serializer.h", + "include/grpc++/impl/codegen/thrift_utils.h", + ], + deps = [ + "grpc++_codegen_base", + ], ) - diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD index 323c2868a85..7879a81c680 100644 --- a/third_party/zlib.BUILD +++ b/third_party/zlib.BUILD @@ -1,37 +1,36 @@ cc_library( - name = "z", - linkstatic = 1, - srcs = [ - 'adler32.c', - 'compress.c', - 'crc32.c', - 'deflate.c', - 'infback.c', - 'inffast.c', - 'inflate.c', - 'inftrees.c', - 'trees.c', - 'uncompr.c', - 'zutil.c', - ], - hdrs = [ - 'crc32.h', - 'deflate.h', - 'gzguts.h', - 'inffast.h', - 'inffixed.h', - 'inflate.h', - 'inftrees.h', - 'trees.h', - 'zconf.h', - 'zlib.h', - 'zutil.h', - ], - includes = [ - 'include', - ], - visibility = [ - "//visibility:public", - ], + name = "z", + srcs = [ + "adler32.c", + "compress.c", + "crc32.c", + "deflate.c", + "infback.c", + "inffast.c", + "inflate.c", + "inftrees.c", + "trees.c", + "uncompr.c", + "zutil.c", + ], + hdrs = [ + "crc32.h", + "deflate.h", + "gzguts.h", + "inffast.h", + "inffixed.h", + "inflate.h", + "inftrees.h", + "trees.h", + "zconf.h", + "zlib.h", + "zutil.h", + ], + includes = [ + "include", + ], + linkstatic = 1, + visibility = [ + "//visibility:public", + ], ) - From 4dc64310bb4f4521fc025f1cb53bab309128c086 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 20 Oct 2016 23:07:37 +0200 Subject: [PATCH 17/23] Adding cc_grpc_library. --- BUILD | 46 ++++++++++++++- WORKSPACE | 17 +++++- bazel/cc_grpc_library.bzl | 35 +++++++++++ bazel/generate_cc.bzl | 59 +++++++++++++++++++ .../grpc_build_system.bzl | 7 +++ 5 files changed, 161 insertions(+), 3 deletions(-) create mode 100644 bazel/cc_grpc_library.bzl create mode 100644 bazel/generate_cc.bzl rename grpc-build-system.bzl => bazel/grpc_build_system.bzl (94%) diff --git a/BUILD b/BUILD index 72301831551..acf9acd3bee 100644 --- a/BUILD +++ b/BUILD @@ -35,7 +35,7 @@ exports_files(["LICENSE"]) package(default_visibility = ["//visibility:public"]) -load(":grpc-build-system.bzl", "grpc_cc_library") +load("//:bazel/grpc_build_system.bzl", "grpc_cc_library", "grpc_proto_plugin") g_stands_for = "good" @@ -190,7 +190,7 @@ grpc_cc_library( "src/compiler/ruby_generator_string-inl.h", ], external_deps = [ - "protobuf_compiler", + "protobuf_clib", ], language = "c++", deps = [ @@ -198,6 +198,48 @@ grpc_cc_library( ], ) +grpc_proto_plugin( + name = "grpc_cpp_plugin", + srcs = ["src/compiler/cpp_plugin.cc"], + deps = [":grpc_plugin_support"], +) + +grpc_proto_plugin( + name = "grpc_csharp_plugin", + srcs = ["src/compiler/csharp_plugin.cc"], + deps = [":grpc_plugin_support"], +) + +grpc_proto_plugin( + name = "grpc_node_plugin", + srcs = ["src/compiler/node_plugin.cc"], + deps = [":grpc_plugin_support"], +) + +grpc_proto_plugin( + name = "grpc_objective_c_plugin", + srcs = ["src/compiler/objective_c_plugin.cc"], + deps = [":grpc_plugin_support"], +) + +grpc_proto_plugin( + name = "grpc_php_plugin", + srcs = ["src/compiler/php_plugin.cc"], + deps = [":grpc_plugin_support"], +) + +grpc_proto_plugin( + name = "grpc_python_plugin", + srcs = ["src/compiler/python_plugin.cc"], + deps = [":grpc_plugin_support"], +) + +grpc_proto_plugin( + name = "grpc_ruby_plugin", + srcs = ["src/compiler/ruby_plugin.cc"], + deps = [":grpc_plugin_support"], +) + grpc_cc_library( name = "grpc_csharp_ext", srcs = [ diff --git a/WORKSPACE b/WORKSPACE index 6a1b70e1528..1499a0a52ff 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -3,6 +3,16 @@ bind( actual = "//third_party/nanopb", ) +bind( + name = "grpc_cpp_plugin", + actual = "//:grpc_cpp_plugin", +) + +bind( + name = "grpc++", + actual = "//:grpc++", +) + bind( name = "libssl", actual = "@submodule_boringssl//:ssl", @@ -13,6 +23,11 @@ bind( actual = "@submodule_zlib//:z", ) +bind( + name = "protobuf", + actual = "@submodule_protobuf//:protobuf", +) + bind( name = "protobuf_clib", actual = "@submodule_protobuf//:protoc_lib", @@ -20,7 +35,7 @@ bind( bind( name = "protobuf_compiler", - actual = "@submodule_protobuf//:protoc_lib", + actual = "@submodule_protobuf//:protoc", ) new_local_repository( diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl new file mode 100644 index 00000000000..8e6f9ebb219 --- /dev/null +++ b/bazel/cc_grpc_library.bzl @@ -0,0 +1,35 @@ +"""Generates and compiles C++ grpc stubs from proto_library rules.""" + +load("//:bazel/generate_cc.bzl", "generate_cc") + +def cc_grpc_library(name, srcs, deps, **kwargs): + """Generates C++ grpc classes from a .proto file. + + Assumes the generated classes will be used in cc_api_version = 2. + + Arguments: + name: name of rule. + srcs: a single proto_library, which wraps the .proto files with services. + deps: a list of C++ proto_library (or cc_proto_library) which provides + the compiled code of any message that the services depend on. + **kwargs: rest of arguments, e.g., compatible_with and visibility. + """ + if len(srcs) > 1: + fail("Only one srcs value supported", "srcs") + + codegen_target = "_" + name + "_codegen" + + generate_cc( + name = codegen_target, + srcs = srcs, + plugin = "//external:grpc_cpp_plugin", + **kwargs + ) + + native.cc_library( + name = name, + srcs = [":" + codegen_target], + hdrs = [":" + codegen_target], + deps = deps + ["//external:grpc++"], + **kwargs + ) diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl new file mode 100644 index 00000000000..a0217427989 --- /dev/null +++ b/bazel/generate_cc.bzl @@ -0,0 +1,59 @@ +"""Generates C++ grpc stubs from proto_library rules. + +This is an internal rule used by cc_grpc_library, and shouldn't be used +directly. +""" + +def generate_cc_impl(ctx): + """Implementation of the gengrpccc rule.""" + protos = [f for src in ctx.attr.srcs for f in src.proto.direct_sources] + includes = [f for src in ctx.attr.srcs for f in src.proto.transitive_imports] + outs = [] + outs += [proto.basename[:-len(".proto")] + ".grpc.pb.h" for proto in protos] + outs += [proto.basename[:-len(".proto")] + ".grpc.pb.cc" for proto in protos] + out_files = [ctx.new_file(out) for out in outs] + # The following should be replaced with ctx.configuration.buildout + # whenever this is added to Skylark. + dir_out = out_files[0].dirname[:-len(protos[0].dirname)] + + arguments = [] + arguments += ["--plugin=protoc-gen-PLUGIN=" + ctx.executable.plugin.path] + arguments += ["--PLUGIN_out=" + ",".join(ctx.attr.flags) + ":" + dir_out] + arguments += ["-I{0}={0}".format(include.path) for include in includes] + arguments += [proto.path for proto in protos] + + ctx.action( + inputs = protos + includes, + outputs = out_files, + executable = ctx.executable._protoc, + arguments = arguments, + ) + + return struct(files=set(out_files)) + +generate_cc = rule( + attrs = { + "srcs": attr.label_list( + mandatory = True, + non_empty = True, + providers = ["proto"], + ), + "plugin": attr.label( + executable = True, + providers = ["files_to_run"], + cfg = HOST_CFG, + ), + "flags": attr.string_list( + mandatory = True, + allow_empty = False + ), + "_protoc": attr.label( + default = Label("//extern:protocol_compiler"), + executable = True, + cfg = HOST_CFG, + ), + }, + # We generate .h files, so we need to output to genfiles. + output_to_genfiles = True, + implementation = generate_cc_impl, +) diff --git a/grpc-build-system.bzl b/bazel/grpc_build_system.bzl similarity index 94% rename from grpc-build-system.bzl rename to bazel/grpc_build_system.bzl index 187cc3e424d..f2dde951fd3 100644 --- a/grpc-build-system.bzl +++ b/bazel/grpc_build_system.bzl @@ -48,3 +48,10 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps "include" ] ) + +def grpc_proto_plugin(name, srcs = [], deps = []): + native.cc_binary( + name = name, + srcs = srcs, + deps = deps, + ) From 799bd5efb70b0abe076353dedd6a1983f1b01951 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 21 Oct 2016 01:54:32 +0200 Subject: [PATCH 18/23] Adding shim for generating C++ protos. --- BUILD | 2 +- WORKSPACE | 12 +---- bazel/BUILD | 9 ++++ bazel/cc_grpc_library.bzl | 45 +++++++++++++---- bazel/generate_cc.bzl | 27 ++++++---- bazel/grpc_build_system.bzl | 11 ++++ src/proto/grpc/testing/BUILD | 69 ++++++++++++++++++++++++++ src/proto/grpc/testing/duplicate/BUILD | 10 ++++ 8 files changed, 154 insertions(+), 31 deletions(-) create mode 100644 bazel/BUILD create mode 100644 src/proto/grpc/testing/BUILD create mode 100644 src/proto/grpc/testing/duplicate/BUILD diff --git a/BUILD b/BUILD index acf9acd3bee..ec750bcef41 100644 --- a/BUILD +++ b/BUILD @@ -35,7 +35,7 @@ exports_files(["LICENSE"]) package(default_visibility = ["//visibility:public"]) -load("//:bazel/grpc_build_system.bzl", "grpc_cc_library", "grpc_proto_plugin") +load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_proto_plugin") g_stands_for = "good" diff --git a/WORKSPACE b/WORKSPACE index 1499a0a52ff..98c3afa5bd2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -3,16 +3,6 @@ bind( actual = "//third_party/nanopb", ) -bind( - name = "grpc_cpp_plugin", - actual = "//:grpc_cpp_plugin", -) - -bind( - name = "grpc++", - actual = "//:grpc++", -) - bind( name = "libssl", actual = "@submodule_boringssl//:ssl", @@ -34,7 +24,7 @@ bind( ) bind( - name = "protobuf_compiler", + name = "protocol_compiler", actual = "@submodule_protobuf//:protoc", ) diff --git a/bazel/BUILD b/bazel/BUILD new file mode 100644 index 00000000000..940a379404f --- /dev/null +++ b/bazel/BUILD @@ -0,0 +1,9 @@ +package(default_visibility = ["//:__subpackages__"]) + +load(":cc_grpc_library.bzl", "cc_grpc_library") + +cc_grpc_library( + name = "well_known_protos", + srcs = "@submodule_protobuf//:well_known_protos", + proto_only = True, +) diff --git a/bazel/cc_grpc_library.bzl b/bazel/cc_grpc_library.bzl index 8e6f9ebb219..e1dd27b0c3f 100644 --- a/bazel/cc_grpc_library.bzl +++ b/bazel/cc_grpc_library.bzl @@ -2,7 +2,7 @@ load("//:bazel/generate_cc.bzl", "generate_cc") -def cc_grpc_library(name, srcs, deps, **kwargs): +def cc_grpc_library(name, srcs, deps, proto_only, **kwargs): """Generates C++ grpc classes from a .proto file. Assumes the generated classes will be used in cc_api_version = 2. @@ -17,19 +17,46 @@ def cc_grpc_library(name, srcs, deps, **kwargs): if len(srcs) > 1: fail("Only one srcs value supported", "srcs") + proto_target = "_" + name + "_only" codegen_target = "_" + name + "_codegen" + codegen_grpc_target = "_" + name + "_grpc_codegen" + proto_deps = ["_" + dep + "_only" for dep in deps if dep.find(':') == -1] + proto_deps += [dep.split(':')[0] + ':' + "_" + dep.split(':')[1] + "_only" for dep in deps if dep.find(':') != -1] - generate_cc( - name = codegen_target, + native.proto_library( + name = proto_target, srcs = srcs, - plugin = "//external:grpc_cpp_plugin", + deps = proto_deps, **kwargs ) - native.cc_library( - name = name, - srcs = [":" + codegen_target], - hdrs = [":" + codegen_target], - deps = deps + ["//external:grpc++"], + generate_cc( + name = codegen_target, + srcs = [proto_target], **kwargs ) + + if not proto_only: + generate_cc( + name = codegen_grpc_target, + srcs = [proto_target], + plugin = "//:grpc_cpp_plugin", + **kwargs + ) + + if not proto_only: + native.cc_library( + name = name, + srcs = [":" + codegen_grpc_target, ":" + codegen_target], + hdrs = [":" + codegen_grpc_target, ":" + codegen_target], + deps = deps + ["//:grpc++", "//:grpc++_codegen_proto", "//external:protobuf"], + **kwargs + ) + else: + native.cc_library( + name = name, + srcs = [":" + codegen_target], + hdrs = [":" + codegen_target], + deps = deps + ["//external:protobuf"], + **kwargs + ) diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl index a0217427989..3665733681e 100644 --- a/bazel/generate_cc.bzl +++ b/bazel/generate_cc.bzl @@ -5,20 +5,27 @@ directly. """ def generate_cc_impl(ctx): - """Implementation of the gengrpccc rule.""" + """Implementation of the generate_cc rule.""" protos = [f for src in ctx.attr.srcs for f in src.proto.direct_sources] includes = [f for src in ctx.attr.srcs for f in src.proto.transitive_imports] outs = [] - outs += [proto.basename[:-len(".proto")] + ".grpc.pb.h" for proto in protos] - outs += [proto.basename[:-len(".proto")] + ".grpc.pb.cc" for proto in protos] + if ctx.executable.plugin: + outs += [proto.basename[:-len(".proto")] + ".grpc.pb.h" for proto in protos] + outs += [proto.basename[:-len(".proto")] + ".grpc.pb.cc" for proto in protos] + else: + outs += [proto.basename[:-len(".proto")] + ".pb.h" for proto in protos] + outs += [proto.basename[:-len(".proto")] + ".pb.cc" for proto in protos] out_files = [ctx.new_file(out) for out in outs] # The following should be replaced with ctx.configuration.buildout # whenever this is added to Skylark. dir_out = out_files[0].dirname[:-len(protos[0].dirname)] arguments = [] - arguments += ["--plugin=protoc-gen-PLUGIN=" + ctx.executable.plugin.path] - arguments += ["--PLUGIN_out=" + ",".join(ctx.attr.flags) + ":" + dir_out] + if ctx.executable.plugin: + arguments += ["--plugin=protoc-gen-PLUGIN=" + ctx.executable.plugin.path] + arguments += ["--PLUGIN_out=" + ",".join(ctx.attr.flags) + ":" + dir_out] + else: + arguments += ["--cpp_out=" + ",".join(ctx.attr.flags) + ":" + dir_out] arguments += ["-I{0}={0}".format(include.path) for include in includes] arguments += [proto.path for proto in protos] @@ -41,16 +48,16 @@ generate_cc = rule( "plugin": attr.label( executable = True, providers = ["files_to_run"], - cfg = HOST_CFG, + cfg = "host", ), "flags": attr.string_list( - mandatory = True, - allow_empty = False + mandatory = False, + allow_empty = True, ), "_protoc": attr.label( - default = Label("//extern:protocol_compiler"), + default = Label("//external:protocol_compiler"), executable = True, - cfg = HOST_CFG, + cfg = "host", ), }, # We generate .h files, so we need to output to genfiles. diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index f2dde951fd3..70a7001d754 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -55,3 +55,14 @@ def grpc_proto_plugin(name, srcs = [], deps = []): srcs = srcs, deps = deps, ) + +load("//:bazel/cc_grpc_library.bzl", "cc_grpc_library") + +def grpc_proto_library(name, srcs = [], deps = [], well_known_deps = [], has_services = True): + cc_grpc_library( + name = name, + srcs = srcs, + deps = deps, + proto_only = not has_services, + ) + diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD new file mode 100644 index 00000000000..2c910060646 --- /dev/null +++ b/src/proto/grpc/testing/BUILD @@ -0,0 +1,69 @@ + +package(default_visibility = ["//visibility:public"]) + +load("//bazel:grpc_build_system.bzl", "grpc_proto_library") + +grpc_proto_library( + name = "compiler_test_proto", + srcs = ["compiler_test.proto"], +) + +grpc_proto_library( + name = "control_proto", + srcs = ["control.proto"], + deps = ["payloads_proto", "stats_proto"], +) + +#grpc_proto_library( +# name = "echo_duplicate_proto", +# srcs = ["duplicate/echo_duplicate.proto"], +# deps = ["echo_messages_proto"], +#) + +grpc_proto_library( + name = "echo_messages_proto", + srcs = ["echo_messages.proto"], +) + +grpc_proto_library( + name = "echo_proto", + srcs = ["echo.proto"], + deps = ["echo_messages_proto"], +) + +grpc_proto_library( + name = "empty_proto", + srcs = ["empty.proto"], +) + +grpc_proto_library( + name = "messages_proto", + srcs = ["messages.proto"], +) + +grpc_proto_library( + name = "metrics_proto", + srcs = ["metrics.proto"], +) + +grpc_proto_library( + name = "payloads_proto", + srcs = ["payloads.proto"], +) + +grpc_proto_library( + name = "services_proto", + srcs = ["services.proto"], + deps = ["control_proto", "messages_proto"], +) + +grpc_proto_library( + name = "stats_proto", + srcs = ["stats.proto"], +) + +grpc_proto_library( + name = "test_proto", + srcs = ["test.proto"], + deps = ["empty_proto", "messages_proto"], +) diff --git a/src/proto/grpc/testing/duplicate/BUILD b/src/proto/grpc/testing/duplicate/BUILD new file mode 100644 index 00000000000..255e699bec0 --- /dev/null +++ b/src/proto/grpc/testing/duplicate/BUILD @@ -0,0 +1,10 @@ + +package(default_visibility = ["//visibility:public"]) + +load("//bazel:grpc_build_system.bzl", "grpc_proto_library") + +grpc_proto_library( + name = "echo_duplicate_proto", + srcs = ["echo_duplicate.proto"], + deps = ["//src/proto/grpc/testing:echo_messages_proto"], +) From 89e23643538cd632e3f0e78671795ab42bf3371c Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 26 Oct 2016 20:08:49 +0200 Subject: [PATCH 19/23] Removing useless message. --- src/proto/grpc/testing/BUILD | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD index 2c910060646..f9f9cbceaf3 100644 --- a/src/proto/grpc/testing/BUILD +++ b/src/proto/grpc/testing/BUILD @@ -14,12 +14,6 @@ grpc_proto_library( deps = ["payloads_proto", "stats_proto"], ) -#grpc_proto_library( -# name = "echo_duplicate_proto", -# srcs = ["duplicate/echo_duplicate.proto"], -# deps = ["echo_messages_proto"], -#) - grpc_proto_library( name = "echo_messages_proto", srcs = ["echo_messages.proto"], From 19014deb841f25d14827147d4812b1ddcce2b693 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 27 Oct 2016 00:33:07 +0200 Subject: [PATCH 20/23] Updating BUILD file. --- BUILD | 51 +++++++++------------------------------------------ 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/BUILD b/BUILD index ec750bcef41..c030f24cd7c 100644 --- a/BUILD +++ b/BUILD @@ -1,4 +1,3 @@ -# gRPC Bazel BUILD file. # # Copyright 2016, Google Inc. # All rights reserved. @@ -437,6 +436,7 @@ grpc_cc_library( "src/core/lib/iomgr/combiner.c", "src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_uv.c", "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_epoll_linux.c", @@ -468,7 +468,6 @@ grpc_cc_library( "src/core/lib/iomgr/tcp_server_windows.c", "src/core/lib/iomgr/tcp_windows.c", "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", "src/core/lib/iomgr/timer_heap.c", "src/core/lib/iomgr/udp_server.c", "src/core/lib/iomgr/unix_sockets_posix.c", @@ -549,27 +548,34 @@ grpc_cc_library( "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_uv.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/port.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", "src/core/lib/iomgr/sockaddr_windows.h", + "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/tcp_client.h", "src/core/lib/iomgr/tcp_posix.h", "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_uv.h", "src/core/lib/iomgr/tcp_windows.h", "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_heap.h", + "src/core/lib/iomgr/timer_uv.h", "src/core/lib/iomgr/udp_server.h", "src/core/lib/iomgr/unix_sockets_posix.h", "src/core/lib/iomgr/wakeup_fd_cv.h", "src/core/lib/iomgr/wakeup_fd_pipe.h", "src/core/lib/iomgr/wakeup_fd_posix.h", "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_uv.h", "src/core/lib/iomgr/workqueue_windows.h", "src/core/lib/json/json.h", "src/core/lib/json/json_common.h", @@ -591,7 +597,7 @@ grpc_cc_library( "src/core/lib/transport/mdstr_hash_table.h", "src/core/lib/transport/metadata.h", "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/method_config.h", "src/core/lib/transport/timeout_encoding.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", @@ -618,47 +624,10 @@ grpc_cc_library( grpc_cc_library( name = "grpc_client_config", srcs = [ - "src/core/ext/client_config/channel_connectivity.c", - "src/core/ext/client_config/client_channel.c", - "src/core/ext/client_config/client_channel_factory.c", - "src/core/ext/client_config/client_config_plugin.c", - "src/core/ext/client_config/connector.c", - "src/core/ext/client_config/default_initial_connect_string.c", - "src/core/ext/client_config/http_connect_handshaker.c", - "src/core/ext/client_config/initial_connect_string.c", - "src/core/ext/client_config/lb_policy.c", - "src/core/ext/client_config/lb_policy_factory.c", - "src/core/ext/client_config/lb_policy_registry.c", "src/core/ext/client_config/message_size_filter.c", - "src/core/ext/client_config/method_config.c", - "src/core/ext/client_config/parse_address.c", - "src/core/ext/client_config/resolver.c", - "src/core/ext/client_config/resolver_factory.c", - "src/core/ext/client_config/resolver_registry.c", - "src/core/ext/client_config/resolver_result.c", - "src/core/ext/client_config/subchannel.c", - "src/core/ext/client_config/subchannel_index.c", - "src/core/ext/client_config/uri_parser.c", ], hdrs = [ - "src/core/ext/client_config/client_channel.h", - "src/core/ext/client_config/client_channel_factory.h", - "src/core/ext/client_config/connector.h", - "src/core/ext/client_config/http_connect_handshaker.h", - "src/core/ext/client_config/initial_connect_string.h", - "src/core/ext/client_config/lb_policy.h", - "src/core/ext/client_config/lb_policy_factory.h", - "src/core/ext/client_config/lb_policy_registry.h", "src/core/ext/client_config/message_size_filter.h", - "src/core/ext/client_config/method_config.h", - "src/core/ext/client_config/parse_address.h", - "src/core/ext/client_config/resolver.h", - "src/core/ext/client_config/resolver_factory.h", - "src/core/ext/client_config/resolver_registry.h", - "src/core/ext/client_config/resolver_result.h", - "src/core/ext/client_config/subchannel.h", - "src/core/ext/client_config/subchannel_index.h", - "src/core/ext/client_config/uri_parser.h", ], language = "c", deps = [ @@ -777,8 +746,6 @@ grpc_cc_library( "src/core/lib/security/credentials/credentials.c", "src/core/lib/security/credentials/credentials_metadata.c", "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.c", "src/core/lib/security/credentials/google_default/google_default_credentials.c", "src/core/lib/security/credentials/iam/iam_credentials.c", "src/core/lib/security/credentials/jwt/json_token.c", From f9445d05523b3909063547a5b932b0a5ef00907a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 4 Jan 2017 22:46:47 +0100 Subject: [PATCH 21/23] Boringssl will need duplication for now. --- .gitmodules | 3 +++ WORKSPACE | 4 ++-- third_party/boringssl | 2 +- third_party/boringssl-with-bazel | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) create mode 160000 third_party/boringssl-with-bazel diff --git a/.gitmodules b/.gitmodules index 04d155cfb41..c8ca8ab0463 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,3 +20,6 @@ [submodule "third_party/benchmark"] path = third_party/benchmark url = https://github.com/google/benchmark +[submodule "third_party/boringssl-with-bazel"] + path = third_party/boringssl-with-bazel + url = https://boringssl.googlesource.com/boringssl diff --git a/WORKSPACE b/WORKSPACE index 98c3afa5bd2..98831096345 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -30,8 +30,8 @@ bind( new_local_repository( name = "submodule_boringssl", - path = "third_party/boringssl", - build_file = "third_party/boringssl/BUILD", + path = "third_party/boringssl-with-bazel", + build_file = "third_party/boringssl-with-bazel/BUILD", ) new_local_repository( diff --git a/third_party/boringssl b/third_party/boringssl index 9612e1d2ce1..c880e42ba1c 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 9612e1d2ce16a1bd67fbbe6ce969839af4d84a29 +Subproject commit c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 diff --git a/third_party/boringssl-with-bazel b/third_party/boringssl-with-bazel new file mode 160000 index 00000000000..886e7d75368 --- /dev/null +++ b/third_party/boringssl-with-bazel @@ -0,0 +1 @@ +Subproject commit 886e7d75368e3f4fab3f4d0d3584e4abfc557755 From 3d5592cea87e58f89fec1b579460b10820a9f5fc Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 4 Jan 2017 23:23:40 +0100 Subject: [PATCH 22/23] Moving message_size_filter properly. --- BUILD | 2 + CMakeLists.txt | 8 +- Makefile | 9 +- binding.gyp | 2 +- build.yaml | 3 +- config.m4 | 2 +- gRPC-Core.podspec | 6 +- grpc.gemspec | 4 +- package.xml | 4 +- .../message_size_filter.c | 2 +- .../message_size_filter.h | 6 +- src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/bad_client/gen_build_yaml.py | 100 ++++++++++++++++++ tools/doxygen/Doxyfile.core.internal | 4 +- .../generated/sources_and_headers.json | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 +-- .../grpc_test_util/grpc_test_util.vcxproj | 3 - .../grpc_test_util.vcxproj.filters | 6 -- .../grpc_unsecure/grpc_unsecure.vcxproj | 6 +- .../grpc_unsecure.vcxproj.filters | 12 +-- 21 files changed, 149 insertions(+), 56 deletions(-) rename src/core/ext/{client_config => client_channel}/message_size_filter.c (99%) rename src/core/ext/{client_config => client_channel}/message_size_filter.h (90%) create mode 100755 test/core/bad_client/gen_build_yaml.py diff --git a/BUILD b/BUILD index e7bfafe6635..2e040bb87ca 100644 --- a/BUILD +++ b/BUILD @@ -659,6 +659,7 @@ grpc_cc_library( "src/core/ext/client_channel/lb_policy.c", "src/core/ext/client_channel/lb_policy_factory.c", "src/core/ext/client_channel/lb_policy_registry.c", + "src/core/ext/client_channel/message_size_filter.c", "src/core/ext/client_channel/parse_address.c", "src/core/ext/client_channel/resolver.c", "src/core/ext/client_channel/resolver_factory.c", @@ -676,6 +677,7 @@ grpc_cc_library( "src/core/ext/client_channel/lb_policy.h", "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/message_size_filter.h", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.h", "src/core/ext/client_channel/resolver_factory.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index ff0927504aa..3d16e3ba6c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -294,7 +294,6 @@ add_library(grpc src/core/lib/channel/handshaker.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c src/core/lib/debug/trace.c @@ -460,6 +459,7 @@ add_library(grpc src/core/ext/client_channel/lb_policy.c src/core/ext/client_channel/lb_policy_factory.c src/core/ext/client_channel/lb_policy_registry.c + src/core/ext/client_channel/message_size_filter.c src/core/ext/client_channel/parse_address.c src/core/ext/client_channel/resolver.c src/core/ext/client_channel/resolver_factory.c @@ -575,7 +575,6 @@ add_library(grpc_cronet src/core/lib/channel/handshaker.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c src/core/lib/debug/trace.c @@ -715,6 +714,7 @@ add_library(grpc_cronet src/core/ext/client_channel/lb_policy.c src/core/ext/client_channel/lb_policy_factory.c src/core/ext/client_channel/lb_policy_registry.c + src/core/ext/client_channel/message_size_filter.c src/core/ext/client_channel/parse_address.c src/core/ext/client_channel/resolver.c src/core/ext/client_channel/resolver_factory.c @@ -827,7 +827,6 @@ add_library(grpc_unsecure src/core/lib/channel/handshaker.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c src/core/lib/debug/trace.c @@ -969,6 +968,7 @@ add_library(grpc_unsecure src/core/ext/client_channel/lb_policy.c src/core/ext/client_channel/lb_policy_factory.c src/core/ext/client_channel/lb_policy_registry.c + src/core/ext/client_channel/message_size_filter.c src/core/ext/client_channel/parse_address.c src/core/ext/client_channel/resolver.c src/core/ext/client_channel/resolver_factory.c @@ -1294,7 +1294,6 @@ add_library(grpc++_cronet src/core/lib/channel/handshaker.c src/core/lib/channel/http_client_filter.c src/core/lib/channel/http_server_filter.c - src/core/lib/channel/message_size_filter.c src/core/lib/compression/compression.c src/core/lib/compression/message_compress.c src/core/lib/debug/trace.c @@ -1409,6 +1408,7 @@ add_library(grpc++_cronet src/core/ext/client_channel/lb_policy.c src/core/ext/client_channel/lb_policy_factory.c src/core/ext/client_channel/lb_policy_registry.c + src/core/ext/client_channel/message_size_filter.c src/core/ext/client_channel/parse_address.c src/core/ext/client_channel/resolver.c src/core/ext/client_channel/resolver_factory.c diff --git a/Makefile b/Makefile index 8f7328ae285..4b35bc16e83 100644 --- a/Makefile +++ b/Makefile @@ -2633,7 +2633,6 @@ LIBGRPC_SRC = \ src/core/lib/channel/handshaker.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ @@ -2799,6 +2798,7 @@ LIBGRPC_SRC = \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/message_size_filter.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ @@ -2932,7 +2932,6 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/channel/handshaker.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ @@ -3072,6 +3071,7 @@ LIBGRPC_CRONET_SRC = \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/message_size_filter.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ @@ -3221,7 +3221,6 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/channel/handshaker.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ @@ -3438,7 +3437,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/channel/handshaker.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ @@ -3580,6 +3578,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/message_size_filter.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ @@ -4017,7 +4016,6 @@ LIBGRPC++_CRONET_SRC = \ src/core/lib/channel/handshaker.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ @@ -4132,6 +4130,7 @@ LIBGRPC++_CRONET_SRC = \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/message_size_filter.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ diff --git a/binding.gyp b/binding.gyp index 516cbdce5dc..910e1c1053d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -574,7 +574,6 @@ 'src/core/lib/channel/handshaker.c', 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/channel/message_size_filter.c', 'src/core/lib/compression/compression.c', 'src/core/lib/compression/message_compress.c', 'src/core/lib/debug/trace.c', @@ -740,6 +739,7 @@ 'src/core/ext/client_channel/lb_policy.c', 'src/core/ext/client_channel/lb_policy_factory.c', 'src/core/ext/client_channel/lb_policy_registry.c', + 'src/core/ext/client_channel/message_size_filter.c', 'src/core/ext/client_channel/parse_address.c', 'src/core/ext/client_channel/resolver.c', 'src/core/ext/client_channel/resolver_factory.c', diff --git a/build.yaml b/build.yaml index df009539b27..8d14507b153 100644 --- a/build.yaml +++ b/build.yaml @@ -269,7 +269,6 @@ filegroups: - src/core/lib/channel/handshaker.c - src/core/lib/channel/http_client_filter.c - src/core/lib/channel/http_server_filter.c - - src/core/lib/channel/message_size_filter.c - src/core/lib/compression/compression.c - src/core/lib/compression/message_compress.c - src/core/lib/debug/trace.c @@ -386,6 +385,7 @@ filegroups: - src/core/ext/client_channel/lb_policy.h - src/core/ext/client_channel/lb_policy_factory.h - src/core/ext/client_channel/lb_policy_registry.h + - src/core/ext/client_channel/message_size_filter.h - src/core/ext/client_channel/parse_address.h - src/core/ext/client_channel/resolver.h - src/core/ext/client_channel/resolver_factory.h @@ -405,6 +405,7 @@ filegroups: - src/core/ext/client_channel/lb_policy.c - src/core/ext/client_channel/lb_policy_factory.c - src/core/ext/client_channel/lb_policy_registry.c + - src/core/ext/client_channel/message_size_filter.c - src/core/ext/client_channel/parse_address.c - src/core/ext/client_channel/resolver.c - src/core/ext/client_channel/resolver_factory.c diff --git a/config.m4 b/config.m4 index 4b86e25581d..e4d55c9e195 100644 --- a/config.m4 +++ b/config.m4 @@ -90,7 +90,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/channel/handshaker.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ @@ -256,6 +255,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ + src/core/ext/client_channel/message_size_filter.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index e10e534a5ed..f8b95f91528 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -257,7 +257,6 @@ Pod::Spec.new do |s| 'src/core/lib/channel/handshaker.h', 'src/core/lib/channel/http_client_filter.h', 'src/core/lib/channel/http_server_filter.h', - 'src/core/lib/channel/message_size_filter.h', 'src/core/lib/compression/algorithm_metadata.h', 'src/core/lib/compression/message_compress.h', 'src/core/lib/debug/trace.h', @@ -398,6 +397,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/lb_policy.h', 'src/core/ext/client_channel/lb_policy_factory.h', 'src/core/ext/client_channel/lb_policy_registry.h', + 'src/core/ext/client_channel/message_size_filter.h', 'src/core/ext/client_channel/parse_address.h', 'src/core/ext/client_channel/resolver.h', 'src/core/ext/client_channel/resolver_factory.h', @@ -436,7 +436,6 @@ Pod::Spec.new do |s| 'src/core/lib/channel/handshaker.c', 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/channel/message_size_filter.c', 'src/core/lib/compression/compression.c', 'src/core/lib/compression/message_compress.c', 'src/core/lib/debug/trace.c', @@ -602,6 +601,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/lb_policy.c', 'src/core/ext/client_channel/lb_policy_factory.c', 'src/core/ext/client_channel/lb_policy_registry.c', + 'src/core/ext/client_channel/message_size_filter.c', 'src/core/ext/client_channel/parse_address.c', 'src/core/ext/client_channel/resolver.c', 'src/core/ext/client_channel/resolver_factory.c', @@ -664,7 +664,6 @@ Pod::Spec.new do |s| 'src/core/lib/channel/handshaker.h', 'src/core/lib/channel/http_client_filter.h', 'src/core/lib/channel/http_server_filter.h', - 'src/core/lib/channel/message_size_filter.h', 'src/core/lib/compression/algorithm_metadata.h', 'src/core/lib/compression/message_compress.h', 'src/core/lib/debug/trace.h', @@ -805,6 +804,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_channel/lb_policy.h', 'src/core/ext/client_channel/lb_policy_factory.h', 'src/core/ext/client_channel/lb_policy_registry.h', + 'src/core/ext/client_channel/message_size_filter.h', 'src/core/ext/client_channel/parse_address.h', 'src/core/ext/client_channel/resolver.h', 'src/core/ext/client_channel/resolver_factory.h', diff --git a/grpc.gemspec b/grpc.gemspec index 9cafd1f2f9a..563ad58725d 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -174,7 +174,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/handshaker.h ) s.files += %w( src/core/lib/channel/http_client_filter.h ) s.files += %w( src/core/lib/channel/http_server_filter.h ) - s.files += %w( src/core/lib/channel/message_size_filter.h ) s.files += %w( src/core/lib/compression/algorithm_metadata.h ) s.files += %w( src/core/lib/compression/message_compress.h ) s.files += %w( src/core/lib/debug/trace.h ) @@ -315,6 +314,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_channel/lb_policy.h ) s.files += %w( src/core/ext/client_channel/lb_policy_factory.h ) s.files += %w( src/core/ext/client_channel/lb_policy_registry.h ) + s.files += %w( src/core/ext/client_channel/message_size_filter.h ) s.files += %w( src/core/ext/client_channel/parse_address.h ) s.files += %w( src/core/ext/client_channel/resolver.h ) s.files += %w( src/core/ext/client_channel/resolver_factory.h ) @@ -353,7 +353,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/channel/handshaker.c ) s.files += %w( src/core/lib/channel/http_client_filter.c ) s.files += %w( src/core/lib/channel/http_server_filter.c ) - s.files += %w( src/core/lib/channel/message_size_filter.c ) s.files += %w( src/core/lib/compression/compression.c ) s.files += %w( src/core/lib/compression/message_compress.c ) s.files += %w( src/core/lib/debug/trace.c ) @@ -519,6 +518,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_channel/lb_policy.c ) s.files += %w( src/core/ext/client_channel/lb_policy_factory.c ) s.files += %w( src/core/ext/client_channel/lb_policy_registry.c ) + s.files += %w( src/core/ext/client_channel/message_size_filter.c ) s.files += %w( src/core/ext/client_channel/parse_address.c ) s.files += %w( src/core/ext/client_channel/resolver.c ) s.files += %w( src/core/ext/client_channel/resolver_factory.c ) diff --git a/package.xml b/package.xml index 61668815a68..871495231a4 100644 --- a/package.xml +++ b/package.xml @@ -182,7 +182,6 @@ - @@ -323,6 +322,7 @@ + @@ -361,7 +361,6 @@ - @@ -527,6 +526,7 @@ + diff --git a/src/core/ext/client_config/message_size_filter.c b/src/core/ext/client_channel/message_size_filter.c similarity index 99% rename from src/core/ext/client_config/message_size_filter.c rename to src/core/ext/client_channel/message_size_filter.c index f0b20742e7e..c6d94cb6d05 100644 --- a/src/core/ext/client_config/message_size_filter.c +++ b/src/core/ext/client_channel/message_size_filter.c @@ -29,7 +29,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#include "src/core/ext/client_config/message_size_filter.h" +#include "src/core/ext/client_channel/message_size_filter.h" #include #include diff --git a/src/core/ext/client_config/message_size_filter.h b/src/core/ext/client_channel/message_size_filter.h similarity index 90% rename from src/core/ext/client_config/message_size_filter.h rename to src/core/ext/client_channel/message_size_filter.h index a88ff7f81a1..8ee4f4cca45 100644 --- a/src/core/ext/client_config/message_size_filter.h +++ b/src/core/ext/client_channel/message_size_filter.h @@ -29,11 +29,11 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#ifndef GRPC_CORE_LIB_CHANNEL_MESSAGE_SIZE_FILTER_H -#define GRPC_CORE_LIB_CHANNEL_MESSAGE_SIZE_FILTER_H +#ifndef GRPC_CORE_EXT_CLIENT_CHANNEL_MESSAGE_SIZE_FILTER_H +#define GRPC_CORE_EXT_CLIENT_CHANNEL_MESSAGE_SIZE_FILTER_H #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_message_size_filter; -#endif /* GRPC_CORE_LIB_CHANNEL_MESSAGE_SIZE_FILTER_H */ +#endif /* GRPC_CORE_EXT_CLIENT_CHANNEL_MESSAGE_SIZE_FILTER_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index d43f93b94fe..804c30f7982 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -84,7 +84,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/channel/handshaker.c', 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/channel/message_size_filter.c', 'src/core/lib/compression/compression.c', 'src/core/lib/compression/message_compress.c', 'src/core/lib/debug/trace.c', @@ -250,6 +249,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_channel/lb_policy.c', 'src/core/ext/client_channel/lb_policy_factory.c', 'src/core/ext/client_channel/lb_policy_registry.c', + 'src/core/ext/client_channel/message_size_filter.c', 'src/core/ext/client_channel/parse_address.c', 'src/core/ext/client_channel/resolver.c', 'src/core/ext/client_channel/resolver_factory.c', diff --git a/test/core/bad_client/gen_build_yaml.py b/test/core/bad_client/gen_build_yaml.py new file mode 100755 index 00000000000..32ab3f2137a --- /dev/null +++ b/test/core/bad_client/gen_build_yaml.py @@ -0,0 +1,100 @@ +#!/usr/bin/env python2.7 +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +"""Generates the appropriate build.json data for all the bad_client tests.""" + + +import collections +import yaml + +TestOptions = collections.namedtuple('TestOptions', 'flaky cpu_cost') +default_test_options = TestOptions(False, 1.0) + +# maps test names to options +BAD_CLIENT_TESTS = { + 'badreq': default_test_options, + 'connection_prefix': default_test_options._replace(cpu_cost=0.2), + 'headers': default_test_options._replace(cpu_cost=0.2), + 'initial_settings_frame': default_test_options._replace(cpu_cost=0.2), + 'head_of_line_blocking': default_test_options, + 'large_metadata': default_test_options, + 'server_registered_method': default_test_options, + 'simple_request': default_test_options, + 'window_overflow': default_test_options, + 'unknown_frame': default_test_options, +} + +def main(): + json = { + '#': 'generated with test/bad_client/gen_build_json.py', + 'libs': [ + { + 'name': 'bad_client_test', + 'build': 'private', + 'language': 'c', + 'src': [ + 'test/core/bad_client/bad_client.c' + ], + 'headers': [ + 'test/core/bad_client/bad_client.h' + ], + 'vs_proj_dir': 'test/bad_client', + 'deps': [ + 'grpc_test_util_unsecure', + 'grpc_unsecure', + 'gpr_test_util', + 'gpr' + ] + }], + 'targets': [ + { + 'name': '%s_bad_client_test' % t, + 'cpu_cost': BAD_CLIENT_TESTS[t].cpu_cost, + 'build': 'test', + 'language': 'c', + 'secure': 'no', + 'src': ['test/core/bad_client/tests/%s.c' % t], + 'vs_proj_dir': 'test', + 'exclude_iomgrs': ['uv'], + 'deps': [ + 'bad_client_test', + 'grpc_test_util_unsecure', + 'grpc_unsecure', + 'gpr_test_util', + 'gpr' + ] + } + for t in sorted(BAD_CLIENT_TESTS.keys())]} + print yaml.dump(json) + + +if __name__ == '__main__': + main() diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 6572bd4ddf9..7213d022dc8 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -798,7 +798,6 @@ src/core/lib/channel/deadline_filter.h \ src/core/lib/channel/handshaker.h \ src/core/lib/channel/http_client_filter.h \ src/core/lib/channel/http_server_filter.h \ -src/core/lib/channel/message_size_filter.h \ src/core/lib/compression/algorithm_metadata.h \ src/core/lib/compression/message_compress.h \ src/core/lib/debug/trace.h \ @@ -939,6 +938,7 @@ src/core/ext/client_channel/initial_connect_string.h \ src/core/ext/client_channel/lb_policy.h \ src/core/ext/client_channel/lb_policy_factory.h \ src/core/ext/client_channel/lb_policy_registry.h \ +src/core/ext/client_channel/message_size_filter.h \ src/core/ext/client_channel/parse_address.h \ src/core/ext/client_channel/resolver.h \ src/core/ext/client_channel/resolver_factory.h \ @@ -977,7 +977,6 @@ src/core/lib/channel/deadline_filter.c \ src/core/lib/channel/handshaker.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ -src/core/lib/channel/message_size_filter.c \ src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ @@ -1143,6 +1142,7 @@ src/core/ext/client_channel/initial_connect_string.c \ src/core/ext/client_channel/lb_policy.c \ src/core/ext/client_channel/lb_policy_factory.c \ src/core/ext/client_channel/lb_policy_registry.c \ +src/core/ext/client_channel/message_size_filter.c \ src/core/ext/client_channel/parse_address.c \ src/core/ext/client_channel/resolver.c \ src/core/ext/client_channel/resolver_factory.c \ diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json index 6ae269cc20d..77e6b7e8afd 100644 --- a/tools/run_tests/generated/sources_and_headers.json +++ b/tools/run_tests/generated/sources_and_headers.json @@ -6683,7 +6683,6 @@ "src/core/lib/channel/handshaker.h", "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", "src/core/lib/compression/message_compress.h", "src/core/lib/debug/trace.h", @@ -6803,8 +6802,6 @@ "src/core/lib/channel/http_client_filter.h", "src/core/lib/channel/http_server_filter.c", "src/core/lib/channel/http_server_filter.h", - "src/core/lib/channel/message_size_filter.c", - "src/core/lib/channel/message_size_filter.h", "src/core/lib/compression/algorithm_metadata.h", "src/core/lib/compression/compression.c", "src/core/lib/compression/message_compress.c", @@ -7011,6 +7008,7 @@ "src/core/ext/client_channel/lb_policy.h", "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/message_size_filter.h", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.h", "src/core/ext/client_channel/resolver_factory.h", @@ -7042,6 +7040,8 @@ "src/core/ext/client_channel/lb_policy_factory.h", "src/core/ext/client_channel/lb_policy_registry.c", "src/core/ext/client_channel/lb_policy_registry.h", + "src/core/ext/client_channel/message_size_filter.c", + "src/core/ext/client_channel/message_size_filter.h", "src/core/ext/client_channel/parse_address.c", "src/core/ext/client_channel/parse_address.h", "src/core/ext/client_channel/resolver.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 558b5b0c66a..6725b1c18a3 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -307,7 +307,6 @@ - @@ -448,6 +447,7 @@ + @@ -498,8 +498,6 @@ - - @@ -830,6 +828,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index a40a1b5f1c8..eb38a01ca77 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -31,9 +31,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\compression @@ -529,6 +526,9 @@ src\core\ext\client_channel + + src\core\ext\client_channel + src\core\ext\client_channel @@ -764,9 +764,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\compression @@ -1187,6 +1184,9 @@ src\core\ext\client_channel + + src\core\ext\client_channel + src\core\ext\client_channel diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index 2acdd32cf3e..33590c55349 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -200,7 +200,6 @@ - @@ -347,8 +346,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index 6c918f12546..41604134550 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -88,9 +88,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\compression @@ -554,9 +551,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\compression diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 661192101c8..6143c9c8a30 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -297,7 +297,6 @@ - @@ -415,6 +414,7 @@ + @@ -466,8 +466,6 @@ - - @@ -750,6 +748,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 466116e6043..8d19f4716a4 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -34,9 +34,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\compression @@ -460,6 +457,9 @@ src\core\ext\client_channel + + src\core\ext\client_channel + src\core\ext\client_channel @@ -677,9 +677,6 @@ src\core\lib\channel - - src\core\lib\channel - src\core\lib\compression @@ -1031,6 +1028,9 @@ src\core\ext\client_channel + + src\core\ext\client_channel + src\core\ext\client_channel From c8b0fba95350235c51fb7cf3fe0f0889fb89f2c4 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 4 Jan 2017 23:32:27 +0100 Subject: [PATCH 23/23] Forgot to git add these. --- test/core/bad_ssl/gen_build_yaml.py | 106 ++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100755 test/core/bad_ssl/gen_build_yaml.py diff --git a/test/core/bad_ssl/gen_build_yaml.py b/test/core/bad_ssl/gen_build_yaml.py new file mode 100755 index 00000000000..c17b17eb136 --- /dev/null +++ b/test/core/bad_ssl/gen_build_yaml.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python2.7 +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +"""Generates the appropriate build.json data for all the end2end tests.""" + + +import collections +import yaml + +TestOptions = collections.namedtuple('TestOptions', 'flaky cpu_cost') +default_test_options = TestOptions(False, 1.0) + +# maps test names to options +BAD_CLIENT_TESTS = { + 'cert': default_test_options._replace(cpu_cost=0.1), + # Disabling this test because it does not link correctly as written + # 'alpn': default_test_options._replace(cpu_cost=0.1), +} + +def main(): + json = { + '#': 'generated with test/bad_ssl/gen_build_json.py', + 'libs': [ + { + 'name': 'bad_ssl_test_server', + 'build': 'private', + 'language': 'c', + 'src': ['test/core/bad_ssl/server_common.c'], + 'headers': ['test/core/bad_ssl/server_common.h'], + 'vs_proj_dir': 'test', + 'platforms': ['linux', 'posix', 'mac'], + 'deps': [ + 'grpc_test_util', + 'grpc', + 'gpr_test_util', + 'gpr' + ] + } + ], + 'targets': [ + { + 'name': 'bad_ssl_%s_server' % t, + 'build': 'test', + 'language': 'c', + 'run': False, + 'src': ['test/core/bad_ssl/servers/%s.c' % t], + 'vs_proj_dir': 'test/bad_ssl', + 'platforms': ['linux', 'posix', 'mac'], + 'deps': [ + 'bad_ssl_test_server', + 'grpc_test_util', + 'grpc', + 'gpr_test_util', + 'gpr' + ] + } + for t in sorted(BAD_CLIENT_TESTS.keys())] + [ + { + 'name': 'bad_ssl_%s_test' % t, + 'cpu_cost': BAD_CLIENT_TESTS[t].cpu_cost, + 'build': 'test', + 'language': 'c', + 'src': ['test/core/bad_ssl/bad_ssl_test.c'], + 'vs_proj_dir': 'test', + 'platforms': ['linux', 'posix', 'mac'], + 'deps': [ + 'grpc_test_util', + 'grpc', + 'gpr_test_util', + 'gpr' + ] + } + for t in sorted(BAD_CLIENT_TESTS.keys())]} + print yaml.dump(json) + + +if __name__ == '__main__': + main()