From 7155834b856d3b479fc6cc2aef6d2810dc8e5a82 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 19 Apr 2019 08:14:55 -0700 Subject: [PATCH] Fix CgRPC linker warnings Without this these warnings are produced at link time: ``` ld: warning: pointer not aligned at address 0x1004354AA (_grpc_lb_v1_ClientStats_fields + 106 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ld: warning: pointer not aligned at address 0x10043544B (_grpc_lb_v1_ClientStats_fields + 11 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ld: warning: pointer not aligned at address 0x1004354EE (_grpc_lb_v1_LoadBalanceRequest_fields + 30 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ld: warning: pointer not aligned at address 0x1004354DB (_grpc_lb_v1_LoadBalanceRequest_fields + 11 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ld: warning: pointer not aligned at address 0x10043552E (_grpc_lb_v1_InitialLoadBalanceResponse_fields + 30 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ld: warning: pointer not aligned at address 0x10043555B (_grpc_lb_v1_ServerList_fields + 11 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ld: warning: pointer not aligned at address 0x10043559E (_grpc_lb_v1_LoadBalanceResponse_fields + 30 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ld: warning: pointer not aligned at address 0x10043558B (_grpc_lb_v1_LoadBalanceResponse_fields + 11 from bazel-out/ios_x86_64-fastbuild/bin/external/com_github_grpc_grpc_swift/libCgRPC.a(load_balancer.pb.o)) ``` --- third_party/com_github_grpc_grpc_swift/BUILD.overlay | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/com_github_grpc_grpc_swift/BUILD.overlay b/third_party/com_github_grpc_grpc_swift/BUILD.overlay index 0b1ef111b..664799378 100644 --- a/third_party/com_github_grpc_grpc_swift/BUILD.overlay +++ b/third_party/com_github_grpc_grpc_swift/BUILD.overlay @@ -46,6 +46,7 @@ cc_library( "Sources/CgRPC/third_party/nanopb/**/*.h", ]) + ["Sources/CgRPC/shim/internal.h"], hdrs = ["Sources/CgRPC/shim/cgrpc.h"], + copts = ["-DPB_NO_PACKED_STRUCTS=1"], includes = ["Sources/CgRPC/include"], tags = ["swift_module=CgRPC"], deps = [