diff options
author | yihuaz <yihuaz@google.com> | 2018-03-08 13:21:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-08 13:21:07 -0800 |
commit | 3287ceb06773ff3d7463a06c5f2dac742527135c (patch) | |
tree | 463f1da9a21eab60b9baeed7de5317fbd5a81fc0 /bazel | |
parent | 44dac6050a4ec30cbc794bcd031fb6c0627f7923 (diff) | |
parent | 04fb58efbd62e11466b79dbdf4f1433cc2c75a89 (diff) |
Merge pull request #14638 from yihuazhang/hook_alts_again
Add ALTS code to grpc/core
Diffstat (limited to 'bazel')
-rw-r--r-- | bazel/grpc_build_system.bzl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index e04e064037..9194f37a17 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -57,6 +57,12 @@ def _maybe_update_cc_library_hdrs(hdrs): ret.append(h) return ret +def _maybe_update_cc_library_defines(name): + ret = [] + if name == "alts_proto": + ret += ["PB_FIELD_16BIT=1"] + return ret + def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++", testonly = False, visibility = None, @@ -64,10 +70,11 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], copts = [] if language.upper() == "C": copts = if_not_windows(["-std=c99"]) + defines = _maybe_update_cc_library_defines(name) native.cc_library( name = name, srcs = srcs, - defines = select({"//:grpc_no_ares": ["GRPC_ARES=0"], + defines = defines + select({"//:grpc_no_ares": ["GRPC_ARES=0"], "//conditions:default": [],}) + select({"//:remote_execution": ["GRPC_PORT_ISOLATED_RUNTIME=1"], "//conditions:default": [],}) + |