bazel.rc 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # bazelrc file
  2. # bazel >= 0.18 looks for %workspace%/.bazelrc (which redirects here)
  3. # Older bazel versions look for %workspace%/tools/bazel.rc (this file)
  4. # See https://github.com/bazelbuild/bazel/issues/6319
  5. build --client_env=CC=clang
  6. build --copt=-DGRPC_BAZEL_BUILD
  7. build --action_env=GRPC_BAZEL_RUNTIME=1
  8. build:opt --compilation_mode=opt
  9. build:opt --copt=-Wframe-larger-than=16384
  10. build:dbg --compilation_mode=dbg
  11. build:asan --strip=never
  12. # Workaround for https://github.com/bazelbuild/bazel/issues/6932
  13. build:asan --copt -Wno-macro-redefined
  14. build:asan --copt -D_FORTIFY_SOURCE=0
  15. build:asan --copt=-fsanitize=address
  16. build:asan --copt=-O0
  17. build:asan --copt=-fno-omit-frame-pointer
  18. build:asan --copt=-DGPR_NO_DIRECT_SYSCALLS
  19. build:asan --copt=-DADDRESS_SANITIZER # used by absl
  20. build:asan --linkopt=-fsanitize=address
  21. build:asan --action_env=ASAN_OPTIONS=detect_leaks=1:color=always
  22. build:asan --action_env=LSAN_OPTIONS=suppressions=test/core/util/lsan_suppressions.txt:report_objects=1
  23. build:msan --strip=never
  24. build:msan --copt=-fsanitize=memory
  25. build:msan --copt=-O0
  26. build:msan --copt=-fsanitize-memory-track-origins
  27. build:msan --copt=-fsanitize-memory-use-after-dtor
  28. build:msan --copt=-fno-omit-frame-pointer
  29. build:msan --copt=-DGPR_NO_DIRECT_SYSCALLS
  30. build:msan --copt=-DMEMORY_SANITIZER # used by absl
  31. build:msan --linkopt=-fsanitize=memory
  32. build:msan --action_env=MSAN_OPTIONS=poison_in_dtor=1
  33. build:tsan --strip=never
  34. build:tsan --copt=-fsanitize=thread
  35. build:tsan --copt=-fno-omit-frame-pointer
  36. build:tsan --copt=-DGPR_NO_DIRECT_SYSCALLS
  37. build:tsan --copt=-DGRPC_TSAN
  38. # TODO(jtattermusch): ideally we would set --copt=-DTHREAD_SANITIZER (used by absl)
  39. # but it seems to do more harm than good and triggers #17175
  40. build:tsan --linkopt=-fsanitize=thread
  41. build:tsan --action_env=TSAN_OPTIONS=suppressions=test/core/util/tsan_suppressions.txt:halt_on_error=1:second_deadlock_stack=1
  42. build:ubsan --strip=never
  43. build:ubsan --copt=-fsanitize=undefined
  44. build:ubsan --copt=-fno-omit-frame-pointer
  45. build:ubsan --copt=-DGRPC_UBSAN
  46. build:ubsan --copt=-DNDEBUG
  47. build:ubsan --copt=-DUNDEFINED_BEHAVIOR_SANITIZER # used by absl
  48. build:ubsan --copt=-fno-sanitize=function,vptr
  49. build:ubsan --linkopt=-fsanitize=undefined
  50. build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
  51. # For some reasons, these two stopped being propagated, so, redeclaring them here.
  52. # That's a hack that needs to be removed once we understand what's going on.
  53. build:ubsan --copt=-DPB_FIELD_32BIT=1
  54. build:ubsan --copt=-DGRPC_PORT_ISOLATED_RUNTIME=1
  55. build:basicprof --strip=never
  56. build:basicprof --copt=-DNDEBUG
  57. build:basicprof --copt=-O2
  58. build:basicprof --copt=-DGRPC_BASIC_PROFILER
  59. build:basicprof --copt=-DGRPC_TIMERS_RDTSC
  60. build:python3 --python_path=python3
  61. build:python3 --python_version=PY3
  62. build:python3 --action_env=PYTHON_BIN_PATH=python3