Skip to content

Commit

Permalink
build:fix bazel build script (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuntaojun authored Jun 6, 2023
1 parent 778648f commit b950180
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 44 deletions.
39 changes: 2 additions & 37 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ cc_library(
"//visibility:public",
],
deps = [
":request_proto",
":response_proto",
":code_cc_proto",
":murmurhash",
":nghttp2",
":ratelimit_proto_v2",
":trpc_proto",
":trpcapi_cc_trpc",
":yaml-cpp-polaris-internal",
"@com_googlesource_code_re2//:re2",
],
Expand All @@ -95,30 +95,13 @@ alias(
],
)

cc_proto_library(
name = "trpcapi_cc_trpc",
srcs = [
"polaris/proto/v1/trpcapi.proto",
],
include = "polaris/proto",
use_grpc_plugin = False,
deps = [
":ratelimit_proto",
":request_proto",
":response_proto",
":routing_proto",
":service_proto",
],
)

cc_proto_library(
name = "response_proto",
srcs = ["polaris/proto/v1/response.proto"],
include = "polaris/proto",
deps = [
":circuit_breaker_proto",
":client_proto",
":dynamicweight_proto",
":metric_proto",
":ratelimit_proto",
":routing_proto",
Expand Down Expand Up @@ -202,13 +185,6 @@ cc_proto_library(
deps = ["@com_google_protobuf//:cc_wkt_protos"],
)

cc_proto_library(
name = "dynamicweight_proto",
srcs = ["polaris/proto/v1/dynamicweight.proto"],
include = "polaris/proto",
deps = ["@com_google_protobuf//:cc_wkt_protos"],
)

cc_proto_library(
name = "model_proto",
srcs = ["polaris/proto/v1/model.proto"],
Expand All @@ -224,16 +200,6 @@ cc_proto_library(
include = "polaris/proto",
)

#trpc协议头
cc_proto_library(
name = "trpc_proto",
srcs = ["polaris/proto/v1/trpc.proto"],
include = "polaris/proto",
deps = [
"@com_google_protobuf//:cc_wkt_protos",
],
)

cc_library(
name = "test",
srcs = glob([
Expand All @@ -255,7 +221,6 @@ cc_library(
":murmurhash",
":nghttp2",
":ratelimit_proto_v2",
":trpcapi_cc_trpc",
":yaml-cpp-polaris-internal",
"@com_googlesource_code_re2//:re2",
],
Expand Down
8 changes: 1 addition & 7 deletions bazel_build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#!/bin/sh

if [[ $1 == "trpc" ]]
then
bazel build polaris_api_trpc --cxxopt="--std=c++17"
exit 0
fi

bazel build polaris_api
bazel build --verbose_failures polaris_api

0 comments on commit b950180

Please sign in to comment.