aboutsummaryrefslogtreecommitdiffhomepage
path: root/bazel/grpc_build_system.bzl
diff options
context:
space:
mode:
authorGravatar Adele Zhou <adelez@google.com>2017-11-29 14:37:18 -0800
committerGravatar Adele Zhou <adelez@google.com>2017-11-30 17:10:28 -0800
commite5df91f477a27ce71a39bca928677b2f08649615 (patch)
treee07c0034feae455bcac7fff11dabdcc0304a3bf0 /bazel/grpc_build_system.bzl
parentc8bf2da1e0f36fe3a6f271140153fad8e9df8dbd (diff)
Use select to decide the test is hermetic or not
Diffstat (limited to 'bazel/grpc_build_system.bzl')
-rw-r--r--bazel/grpc_build_system.bzl10
1 files changed, 5 insertions, 5 deletions
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
index 591fdb5936..a6da377248 100644
--- a/bazel/grpc_build_system.bzl
+++ b/bazel/grpc_build_system.bzl
@@ -26,17 +26,17 @@
def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
external_deps = [], deps = [], standalone = False,
language = "C++", testonly = False, visibility = None,
- alwayslink = 0, defines = []):
+ alwayslink = 0):
copts = []
if language.upper() == "C":
copts = ["-std=c99"]
native.cc_library(
name = name,
srcs = srcs,
- defines = select({
- "//:grpc_no_ares": ["GRPC_ARES=0"],
- "//conditions:default": defines,
- }),
+ defines = select({"//:grpc_no_ares": ["GRPC_ARES=0"],
+ "//conditions:default": [],}) +
+ select({"//:remote_execution": ["GRPC_HERMETIC_TESTS=1"],
+ "//conditions:default": [],}),
hdrs = hdrs + public_hdrs,
deps = deps + ["//external:" + dep for dep in external_deps],
copts = copts,