-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bazelrc
69 lines (61 loc) · 2.62 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
# Optional per-user config goes into user.bazelrc, which is .gitignore-ed.
try-import %workspace%/user.bazelrc
try-import /home/docker.bazelrc
# Alias to simplify disabling / enabling encryption
build --flag_alias=encryption=//k9db/sql/rocksdb:configure_encryption
build --platform_suffix=normal
build --cxxopt="-std=c++2a"
build --host_cxxopt="-std=c++2a"
build --copt -g
build --host_copt -g
build --strip=never
build:asan --platform_suffix=asan
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -g
build:asan --copt -O1
build:asan --copt -fno-omit-frame-pointer
build:asan --copt -DK9DB_ASAN
build:asan --linkopt -fsanitize=address
build:asan --extra_toolchains @rust_nightly_toolchains//:toolchain_for_x86_64-unknown-linux-gnu
test:asan --test_env ASAN_OPTIONS=allow_user_segv_handler=1:handle_segv=0:malloc_context_size=256:fast_unwind_on_malloc=0
# For running under valgrind
build:valgrind --platform_suffix=valgrind
build:valgrind --strip=never
build:valgrind --copt -g
build:valgrind --copt -DK9DB_VALGRIND_MODE
test:valgrind --run_under "valgrind --error-exitcode=1 --leak-check=full"
test:valgrind --test_output all
run:valgrind --run_under "valgrind --error-exitcode=1 --errors-for-leak-kinds=definite --leak-check=full --show-leak-kinds=definite"
# For running under cachegrind
build:cachegrind --platform_suffix=cachegrind
build:cachegrind -c opt
build:cachegrind --copt -DK9DB_OPT
build:cachegrind --host_copt -DK9DB_OPT
test:cachegrind --run_under "valgrind --tool=cachegrind "
test:cachegrind --test_output all
run:cachegrind --run_under "valgrind --tool=cachegrind "
# Optimized build.
build:opt --platform_suffix=opt
build:opt -c opt # use bazel default opt config
build:opt --copt -DK9DB_OPT
build:opt --host_copt -DK9DB_OPT
build:opt --copt -O3
# For thread sanitizer
build:tsan --platform_suffix=tsan
build:tsan --strip=never
build:tsan --copt -fsanitize=thread
build:tsan --copt -g
build:tsan --copt -O1
build:tsan --copt -fno-omit-frame-pointer
build:tsan --copt -DK9DB_TSAN
build:tsan --linkopt -fsanitize=thread
build:tsan --extra_toolchains @rust_nightly_toolchains//:toolchain_for_x86_64-unknown-linux-gnu
test:tsan --test_env ASAN_OPTIONS=allow_user_segv_handler=1:handle_segv=0:malloc_context_size=256:fast_unwind_on_malloc=0
# For running under perf
build:perf --platform_suffix=perf
build:perf -c opt
build:perf --copt -DK9DB_OPT
build:perf --host_copt -DK9DB_OPT
test:perf --run_under "sudo perf stat -B -e cache-references,cache-misses,cycles,instructions,branches,faults,migrations "
run:perf --run_under "sudo perf stat -B -e cache-references,cache-misses,cycles,instructions,branches,faults,migrations "