Fix the inclusion "third_party/nanopb/..." to simply "..."

pull/15595/head
David Garcia Quintas 7 years ago
parent 3351fe3a3f
commit 00e045dbb2
  1. 4
      Makefile
  2. 10
      bazel/grpc_deps.bzl
  3. 4
      src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
  4. 2
      src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h
  5. 4
      src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h
  6. 2
      src/core/tsi/alts/handshaker/altscontext.pb.h
  7. 2
      src/core/tsi/alts/handshaker/handshaker.pb.h
  8. 2
      src/core/tsi/alts/handshaker/transport_security_common.pb.h
  9. 4
      src/core/tsi/alts/handshaker/transport_security_common_api.h
  10. 4
      src/cpp/server/health/default_health_check_service.cc
  11. 2
      src/cpp/server/health/health.pb.h
  12. 4
      templates/Makefile.template
  13. 19
      third_party/nanopb.BUILD
  14. 3
      tools/codegen/core/gen_nano_proto.sh

@ -338,7 +338,9 @@ CPPFLAGS += -g -Wall -Wextra -Werror -Wno-long-long -Wno-unused-parameter -DOSAT
COREFLAGS += -fno-rtti -fno-exceptions
LDFLAGS += -g
DEFINES += PB_FIELD_16BIT
# nanopb tweaks
DEFINES += PB_FIELD_32BIT
CPPFLAGS += -Ithird_party/nanopb
CPPFLAGS += $(CPPFLAGS_$(CONFIG))
CFLAGS += $(CFLAGS_$(CONFIG))

@ -5,7 +5,7 @@ def grpc_deps():
native.bind(
name = "nanopb",
actual = "@com_github_grpc_grpc//third_party/nanopb:nanopb",
actual = "@com_github_nanopb_nanopb//:nanopb",
)
native.bind(
@ -93,6 +93,14 @@ def grpc_deps():
name = "com_google_protobuf",
strip_prefix = "protobuf-b5fbb742af122b565925987e65c08957739976a7",
url = "https://github.com/google/protobuf/archive/b5fbb742af122b565925987e65c08957739976a7.tar.gz",
)
if "com_github_nanopb_nanopb" not in native.existing_rules():
native.new_http_archive(
name = "com_github_nanopb_nanopb",
build_file = "@com_github_grpc_grpc//third_party:nanopb.BUILD",
strip_prefix = "nanopb-f8ac463766281625ad710900479130c7fcb4d63b",
url = "https://github.com/nanopb/nanopb/archive/f8ac463766281625ad710900479130c7fcb4d63b.tar.gz",
)
if "com_github_google_googletest" not in native.existing_rules():

@ -19,8 +19,8 @@
#include <grpc/support/port_platform.h>
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h"
#include "third_party/nanopb/pb_decode.h"
#include "third_party/nanopb/pb_encode.h"
#include "pb_decode.h"
#include "pb_encode.h"
#include <grpc/support/alloc.h>

@ -3,7 +3,7 @@
#ifndef PB_GRPC_LB_V1_LOAD_BALANCER_PB_H_INCLUDED
#define PB_GRPC_LB_V1_LOAD_BALANCER_PB_H_INCLUDED
#include "third_party/nanopb/pb.h"
#include "pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.

@ -21,8 +21,8 @@
#include <grpc/support/port_platform.h>
#include "third_party/nanopb/pb_decode.h"
#include "third_party/nanopb/pb_encode.h"
#include "pb_decode.h"
#include "pb_encode.h"
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>

@ -3,7 +3,7 @@
#ifndef PB_GRPC_GCP_ALTSCONTEXT_PB_H_INCLUDED
#define PB_GRPC_GCP_ALTSCONTEXT_PB_H_INCLUDED
#include "third_party/nanopb/pb.h"
#include "pb.h"
#include "src/core/tsi/alts/handshaker/transport_security_common.pb.h"
/* @@protoc_insertion_point(includes) */

@ -3,7 +3,7 @@
#ifndef PB_GRPC_GCP_HANDSHAKER_PB_H_INCLUDED
#define PB_GRPC_GCP_HANDSHAKER_PB_H_INCLUDED
#include "third_party/nanopb/pb.h"
#include "pb.h"
#include "src/core/tsi/alts/handshaker/transport_security_common.pb.h"
/* @@protoc_insertion_point(includes) */

@ -3,7 +3,7 @@
#ifndef PB_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PB_H_INCLUDED
#define PB_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PB_H_INCLUDED
#include "third_party/nanopb/pb.h"
#include "pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.

@ -21,8 +21,8 @@
#include <grpc/support/port_platform.h>
#include "third_party/nanopb/pb_decode.h"
#include "third_party/nanopb/pb_encode.h"
#include "pb_decode.h"
#include "pb_encode.h"
#include <grpc/slice.h>
#include <grpc/slice_buffer.h>

@ -26,8 +26,8 @@
#include "src/cpp/server/health/default_health_check_service.h"
#include "src/cpp/server/health/health.pb.h"
#include "third_party/nanopb/pb_decode.h"
#include "third_party/nanopb/pb_encode.h"
#include "pb_decode.h"
#include "pb_encode.h"
namespace grpc {
namespace {

@ -3,7 +3,7 @@
#ifndef PB_GRPC_HEALTH_V1_HEALTH_PB_H_INCLUDED
#define PB_GRPC_HEALTH_V1_HEALTH_PB_H_INCLUDED
#include "third_party/nanopb/pb.h"
#include "pb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
#error Regenerate this file with the current version of nanopb generator.

@ -221,7 +221,9 @@
% endif
% endfor
DEFINES += PB_FIELD_16BIT
# nanopb tweaks
DEFINES += PB_FIELD_32BIT
CPPFLAGS += -Ithird_party/nanopb
CPPFLAGS += $(CPPFLAGS_$(CONFIG))
CFLAGS += $(CFLAGS_$(CONFIG))

@ -0,0 +1,19 @@
cc_library(
name = "nanopb",
srcs = [
"pb_common.c",
"pb_decode.c",
"pb_encode.c",
],
hdrs = [
"pb.h",
"pb_common.h",
"pb_decode.h",
"pb_encode.h",
],
defines = [
"PB_FIELD_32BIT=1",
],
visibility = ["//visibility:public"],
)

@ -74,8 +74,7 @@ pushd "$(dirname $INPUT_PROTO)" > /dev/null
protoc \
--plugin=protoc-gen-nanopb="$GRPC_ROOT/third_party/nanopb/generator/protoc-gen-nanopb" \
--nanopb_out='-T -L#include\ \"third_party/nanopb/pb.h\"'":$OUTPUT_DIR" \
"$(basename $INPUT_PROTO)"
--nanopb_out='-T -L#include\ \"pb.h\"'":$OUTPUT_DIR" "$(basename $INPUT_PROTO)"
readonly PROTO_BASENAME=$(basename $INPUT_PROTO .proto)
sed -i "s:$PROTO_BASENAME.pb.h:${GRPC_OUTPUT_DIR}/$PROTO_BASENAME.pb.h:g" \

Loading…
Cancel
Save