diff options
author | Craig Tiller <ctiller@google.com> | 2016-03-29 16:50:44 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-03-29 16:50:44 -0700 |
commit | 92e0f335bd817bd808c2373fa9bca5b91b9d3a65 (patch) | |
tree | 37f541a7cc809471f85493c6b37a1e7bf9dad875 | |
parent | 9557869e158d723ad7afd0b273fdcc414c036666 (diff) | |
parent | dd2b465a458a59371ad9b2a550cf797d0d9b78df (diff) |
Merge branch 'optionalize_roundrobin' into optionalize_census
-rw-r--r-- | BUILD | 37 | ||||
-rw-r--r-- | templates/BUILD.template | 32 | ||||
-rw-r--r-- | templates/tools/fuzzer/runners.template | 2 | ||||
-rw-r--r-- | tools/fuzzer/runners/hpack_parser_fuzzer_test.sh | 2 | ||||
-rw-r--r-- | tools/fuzzer/runners/http_fuzzer_test.sh | 2 | ||||
-rw-r--r-- | tools/fuzzer/runners/json_fuzzer_test.sh | 2 | ||||
-rw-r--r-- | tools/fuzzer/runners/uri_fuzzer_test.sh | 2 |
7 files changed, 47 insertions, 32 deletions
@@ -41,6 +41,7 @@ package(default_visibility = ["//visibility:public"]) + cc_library( name = "gpr", srcs = [ @@ -154,6 +155,7 @@ cc_library( ) + cc_library( name = "grpc", srcs = [ @@ -292,10 +294,6 @@ cc_library( "src/core/lib/tsi/ssl_types.h", "src/core/lib/tsi/transport_security.h", "src/core/lib/tsi/transport_security_interface.h", - "third_party/nanopb/pb.h", - "third_party/nanopb/pb_common.h", - "third_party/nanopb/pb_decode.h", - "third_party/nanopb/pb_encode.h", "src/core/ext/census/context.c", "src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_filter.c", @@ -458,9 +456,6 @@ cc_library( "src/core/lib/tsi/ssl_transport_security.c", "src/core/lib/tsi/transport_security.c", "src/core/plugin_registry/grpc_plugin_registry.c", - "third_party/nanopb/pb_common.c", - "third_party/nanopb/pb_decode.c", - "third_party/nanopb/pb_encode.c", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -485,6 +480,7 @@ cc_library( "//external:libssl", "//external:zlib", ":gpr", + "//external:nanopb", ], copts = [ "-std=gnu99", @@ -492,6 +488,7 @@ cc_library( ) + cc_library( name = "grpc_codegen_lib", srcs = [ @@ -528,6 +525,7 @@ cc_library( ) + cc_library( name = "grpc_unsecure", srcs = [ @@ -652,10 +650,6 @@ cc_library( "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", - "third_party/nanopb/pb.h", - "third_party/nanopb/pb_common.h", - "third_party/nanopb/pb_decode.h", - "third_party/nanopb/pb_encode.h", "src/core/ext/census/context.c", "src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_filter.c", @@ -798,9 +792,6 @@ cc_library( "src/core/lib/transport/transport.c", "src/core/lib/transport/transport_op_string.c", "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", - "third_party/nanopb/pb_common.c", - "third_party/nanopb/pb_decode.c", - "third_party/nanopb/pb_encode.c", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -822,6 +813,7 @@ cc_library( ], deps = [ ":gpr", + "//external:nanopb", ], copts = [ "-std=gnu99", @@ -829,6 +821,7 @@ cc_library( ) + cc_library( name = "grpc_zookeeper", srcs = [ @@ -849,6 +842,7 @@ cc_library( ) + cc_library( name = "grpc++", srcs = [ @@ -981,6 +975,7 @@ cc_library( ) + cc_library( name = "grpc++_codegen_lib", srcs = [ @@ -1044,10 +1039,12 @@ cc_library( ".", ], deps = [ + "//external:protobuf_clib", ], ) + cc_library( name = "grpc++_unsecure", srcs = [ @@ -1172,6 +1169,7 @@ cc_library( ) + cc_library( name = "grpc_plugin_support", srcs = [ @@ -1223,6 +1221,7 @@ cc_library( ) + cc_library( name = "grpc_csharp_ext", srcs = [ @@ -1242,6 +1241,7 @@ cc_library( + objc_library( name = "gpr_objc", srcs = [ @@ -1355,6 +1355,7 @@ objc_library( ) + objc_library( name = "grpc_objc", srcs = [ @@ -1520,9 +1521,6 @@ objc_library( "src/core/lib/tsi/ssl_transport_security.c", "src/core/lib/tsi/transport_security.c", "src/core/plugin_registry/grpc_plugin_registry.c", - "third_party/nanopb/pb_common.c", - "third_party/nanopb/pb_decode.c", - "third_party/nanopb/pb_encode.c", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -1673,10 +1671,6 @@ objc_library( "src/core/lib/tsi/ssl_types.h", "src/core/lib/tsi/transport_security.h", "src/core/lib/tsi/transport_security_interface.h", - "third_party/nanopb/pb.h", - "third_party/nanopb/pb_common.h", - "third_party/nanopb/pb_decode.h", - "third_party/nanopb/pb_encode.h", ], includes = [ "include", @@ -1685,6 +1679,7 @@ objc_library( deps = [ ":gpr_objc", "//external:libssl_objc", + "//external:nanopb", ], sdk_dylibs = ["libz"], ) diff --git a/templates/BUILD.template b/templates/BUILD.template index 54dc697125..23a656c360 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -49,7 +49,9 @@ ] if target_dict.get('build', None) == 'protoc': deps.append("//external:protobuf_compiler") - if target_dict['name'] == 'grpc++_unsecure' or target_dict['name'] == 'grpc++': + 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") @@ -60,7 +62,7 @@ deps.append(':%s' % (d)) return deps %> - + % for lib in libs: % if lib.build in ("all", "protoc"): ${cc_library(lib)} @@ -80,13 +82,19 @@ % 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 lib.get("headers", []): + % for hdr in hdrs: "${hdr}", % endfor - % for src in lib.src: + % for src in srcs: "${src}", % endfor ], @@ -103,6 +111,9 @@ % for dep in get_deps(lib): "${dep}", % endfor + % if uses_nanopb: + "//external:nanopb", + % endif ], % if lib.name in ("grpc", "grpc_unsecure"): copts = [ @@ -113,10 +124,16 @@ </%def> <%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 lib.src: + % for src in srcs: "${src}", % endfor ], @@ -124,7 +141,7 @@ % for hdr in lib.get("public_headers", []): "${hdr}", % endfor - % for hdr in lib.get("headers", []): + % for hdr in hdrs: "${hdr}", % endfor ], @@ -139,6 +156,9 @@ % if lib.get('secure', False): "//external:libssl_objc", % endif + % if uses_nanopb: + "//external:nanopb", + % endif ], % if lib.get("baselib", false): sdk_dylibs = ["libz"], diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template index 287bb2acbf..aa81a6545d 100644 --- a/templates/tools/fuzzer/runners.template +++ b/templates/tools/fuzzer/runners.template @@ -35,7 +35,7 @@ template: | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # - flags="-max_total_time=3600 -jobs=20 -workers=20" + flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index 6f89e5250c..a91cf6d458 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index fb7120ddce..47adad0cb7 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index fc10c77193..9c5cba3baf 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index fb2fa69e34..58f20d021c 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" |