-
Notifications
You must be signed in to change notification settings - Fork 3
/
.bazelrc
82 lines (75 loc) · 4.14 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
71
72
73
74
75
76
77
78
79
80
81
82
build --incompatible_enable_cc_toolchain_resolution
build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
build --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 --incompatible_strict_action_env
build --show_timestamps # Useful for understanding build performance.
build --@rules_rust//rust/toolchain/channel=nightly
build --@rules_rust//:rustfmt.toml=//:.rustfmt.toml
build --incompatible_merge_fixed_and_default_shell_env # https://github.com/bazelbuild/rules_rust/issues/2665
build --output_filter='^//' # Suppress warnings from external dependencies.
# Build TensorFlow with more optimizations to avoid linker OOM
build --per_file_copt=external/org_tensorflow/@-O2,-g0,-DNDEBUG
common --experimental_repo_remote_exec
build:asan --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
build:asan --compilation_mode=dbg
build:asan --strip=never
# Using -gmlt gives file names and line numbers in the warning messages.
build:asan --copt=-gmlt
# To get reasonable performance, docs recommend adding -O1. See
# https://clang.llvm.org/docs/AddressSanitizer.html
build:asan --copt=-O1
build:asan --copt=-fsanitize=address
build:asan --copt=-fno-omit-frame-pointer
build:asan --linkopt=-fsanitize=address
build:asan --action_env=ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:detect_leaks=1
test:asan --test_tag_filters=-noasan
build:tsan --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
build:tsan --compilation_mode=dbg
build:tsan --strip=never
build:tsan --copt=-fsanitize=thread
# Using -gmlt gives file names and line numbers in the warning messages.
build:tsan --copt=-gmlt
# To get reasonable performance, docs recommend adding -O1. See
# https://clang.llvm.org/docs/ThreadSanitizer.html
build:tsan --copt=-O1
build:tsan --copt=-fno-omit-frame-pointer
build:tsan --linkopt=-fsanitize=thread
build:tsan --action_env TSAN_OPTIONS=halt_on_error=1:second_deadlock_stack=1
test:tsan --test_tag_filters=-notsan
build:ubsan --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux
build:ubsan --compilation_mode=dbg
build:ubsan --strip never
# Using -gmlt gives file names and line numbers in the warning messages.
build:ubsan --copt=-gmlt
build:ubsan --copt=-fsanitize=undefined
build:ubsan --copt=-fno-omit-frame-pointer
build:ubsan --linkopt=-fsanitize=undefined
# Ensure the ubsan C++ runtime library is linked in, as suggested on
# https://github.com/bazelbuild/bazel/issues/11122#issuecomment-896613570 to
# work around linker errors.
build:ubsan --linkopt=-fsanitize-link-c++-runtime
build:ubsan --action_env UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
test:ubsan --test_tag_filters=-noubsan
# rules_rust 0.48 doesn't work with rust's experimental lld linking and clang
# (https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html).
build:asan --@rules_rust//:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//:extra_exec_rustc_flag=-Zlinker-features=-lld
build:tsan --@rules_rust//:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//:extra_exec_rustc_flag=-Zlinker-features=-lld
build:ubsan --@rules_rust//:extra_rustc_flag=-Zlinker-features=-lld --@rules_rust//:extra_exec_rustc_flag=-Zlinker-features=-lld
# Settings for remote build execution.
build:cfc-remote --experimental_allow_tags_propagation
build:cfc-remote --define=EXECUTOR=remote
build:cfc-remote --remote_executor=grpcs://remotebuildexecution.googleapis.com
build:cfc-remote --remote_instance_name=projects/560162532548/instances/default
build:cfc-remote --noremote_upload_local_results
build:cfc-remote --google_default_credentials
build:cfc-remote --extra_execution_platforms=//:remote_platform
build:cfc-remote --host_platform=//:remote_platform
build:cfc-remote --platforms=//:remote_platform
build:cfc-remote --jobs=50
# Settings for uploading results to BES.
build:cfc-remote --bes_backend=buildeventservice-pa.googleapis.com
build:cfc-remote --bes_instance_name=560162532548
build:cfc-remote --bes_header=X-Goog-User-Project=560162532548
build:cfc-remote --bes_results_url=http://sponge2/
build:cfc-remote --grpc_keepalive_time=30s
# Enable CFC remote features when enabled for google-parfait.
common:parfait-remote --config=cfc-remote