From eaf64866777a42996835606e9c3626c974e728c5 Mon Sep 17 00:00:00 2001 From: Yihua Zhang Date: Tue, 6 Mar 2018 21:40:45 -0800 Subject: Add ALTS code to grpc/core --- bazel/grpc_build_system.bzl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bazel') diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 7bc186265d..662068ad2a 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": [],}) + -- cgit v1.2.3