Add a new environment variable GRPC_BAZEL_BUILD

pull/17881/head
Lidi Zheng 6 years ago
parent 48ccc2477c
commit e9c67f23f3
  1. 4
      src/python/grpcio_tests/tests/bazel_namespace_package_hack.py
  2. 1
      tools/bazel.rc

@ -24,8 +24,8 @@ import sys
# Analysis in depth: https://github.com/bazelbuild/rules_python/issues/55
def sys_path_to_site_dir_hack():
"""Add valid sys.path item to site directory to parse the .pth files."""
# If not running under Bazel, return.
if 'RUN_UNDER_RUNFILES' not in os.environ:
# GRPC_BAZEL_BUILD is explicitly set by tools/bazel.rc.
if 'GRPC_BAZEL_BUILD' not in os.environ:
return
for item in sys.path:
if os.path.exists(item):

@ -5,6 +5,7 @@
build --client_env=CC=clang
build --copt=-DGRPC_BAZEL_BUILD
build --action_env=GRPC_BAZEL_BUILD=1
build:opt --compilation_mode=opt
build:opt --copt=-Wframe-larger-than=16384

Loading…
Cancel
Save