forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
70 lines (66 loc) · 4.17 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Must be first. Enables build:windows, build:linux, build:macos, build:freebsd, build:openbsd
build --enable_platform_specific_config
###############################################################################
# On Windows, provide: USE_CLANG_CL=1, CC=clang, BAZEL_LLVM, BAZEL_SH
# On all platforms, provide: PYTHON3_BIN_PATH=python
###############################################################################
build --action_env=PATH
build:linux --compilation_mode=opt
build:macos --compilation_mode=opt
build:windows --compilation_mode=fastbuild
# This workaround is needed to prevent Bazel from compiling the same file twice (once PIC and once not).
build:linux --force_pic
build:macos --force_pic
# TODO(mehrdadn): Revert the "-\\.(asm|S)$" exclusion when this Bazel bug
# for compiling assembly files is fixed on Windows:
# https://github.com/bazelbuild/bazel/issues/8924
# Warnings should be errors
build --per_file_copt="-\\.(asm|S)$,-.*/arrow/util/logging\\.cc@-Werror"
# Ignore warnings for protobuf generated files and external projects.
build --per_file_copt="-\\.(asm|S)$,\\.pb\\.cc$@-w"
build --per_file_copt="-\\.(asm|S)$,external/.*@-w"
# Ignore this warning since it's impractical to fix in the relevant headers
build --per_file_copt="-\\.(asm|S)$,.*/ray/raylet/reconstruction_policy_test\\.cc@-Wno-inconsistent-missing-override"
# Ignore this warning since CPython and Cython have issue removing deprecated tp_print on MacOS
build --per_file_copt="-\\.(asm|S)$,.*/_raylet\\.cpp@-Wno-deprecated-declarations"
build --per_file_copt="-\\.(asm|S)$,.*/_streaming\\.cpp@-Wno-deprecated-declarations"
# Ignore minor warnings for host tools, which we generally can't control
build --host_copt="-Wno-builtin-macro-redefined"
build --host_copt="-Wno-inconsistent-missing-override"
build --host_copt="-Wno-microsoft-unqualified-friend"
# This workaround is needed due to https://github.com/bazelbuild/bazel/issues/4341
build --per_file_copt="-\\.(asm|S)$,external/com_github_grpc_grpc/.*@-DGRPC_BAZEL_BUILD"
build --http_timeout_scaling=5.0
build:iwyu --experimental_action_listener=//:iwyu_cpp
# Print relative paths when possible
build:windows --attempt_to_print_relative_paths
# Save disk space by hardlinking cache hits instead of copying
build:windows --experimental_repository_cache_hardlinks
# Avoid duplicate noise in the build output
build:windows --experimental_ui_deduplicate
# Clean the environment before building, to make builds more deterministic
build:windows --incompatible_strict_action_env
# For colored output (seems necessary on Windows)
build:windows --color=yes
# For compiler colored output (seems necessary on Windows)
build:windows --per_file_copt="-\\.(asm|S)$@-fansi-escape-codes"
build:windows --per_file_copt="-\\.(asm|S)$@-fcolor-diagnostics"
# Thread sanitizer configuration:
build:tsan --strip=never
build:tsan --copt -fsanitize=thread
build:tsan --copt -DTHREAD_SANITIZER
build:tsan --copt -g
build:tsan --copt -fno-omit-frame-pointer
build:tsan --linkopt -fsanitize=thread
test:ci --flaky_test_attempts=3
test:ci --nocache_test_results
test:ci --progress_report_interval=100
test:ci --show_progress_rate_limit=100
test:ci --show_timestamps
test:ci --spawn_strategy=local
test:ci --test_output=errors
test:ci --test_verbose_timeout_warnings
# [Linux] Uncomment this line to print a stack trace on exit.
#test:linux --run_under="bash -c 'if command -v strace >/dev/null && strace -qq -k -e exit true 2>/dev/null; then strace -qq -k -e exit -e trace=\"!all\" -s 32768 -f -o >(awk \"/^[0-9]+ / { y = \\$3 != \\\"SIGCHLD\\\" && \\$3 != \\\"SIGTERM\\\" && \\$5 != \\\"SIGTERM\\\" && \\$5 != \\\"SIGKILL2\\\"; } y { print; }\" 1>&2 && cat 1>&2) -- \"$@\"; else \"$@\"; fi' -"
# [Linux] Uncomment this line to preload libSegFault.so if available, to print a stack trace on aborts and segfault. (Note: This doesn't always work.)
#test:linux --run_under="bash -c 'unset GREP_OPTIONS && if ! grep -q -o Microsoft /proc/version 2>/dev/null; then libs=\"$(command -v ldconfig >/dev/null && ldconfig -p | grep -F -o -e \"libSegFault.so\" | uniq | tr \"\\\\n\" :)\" && if [ -n \"${libs%:}\" ]; then export SEGFAULT_SIGNALS=\"abrt segv\" LD_PRELOAD=\"${libs}${LD_PRELOAD-}\"; fi; fi && \"$@\"' -"