forked from stratum/stratum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
42 lines (36 loc) · 1.34 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
# Copyright 2018-present Open Networking Foundation
# SPDX-License-Identifier: Apache-2.0
# General build options
build --conlyopt='-std=gnu11'
build --cxxopt='-std=gnu++11'
build --copt -Wall
build --copt -Wno-sign-compare
# Address sanitizer
build:asan --strip=never
build:asan --copt -fsanitize=address
build:asan --copt -DADDRESS_SANITIZER
build:asan --copt -O1
build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address
# UB sanitizer
# We use the minimal runtime version, because it has relaxed requirements:
# https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#minimal-runtime
build:ubsan --copt -fsanitize=undefined --copt -fsanitize-minimal-runtime
build:ubsan --linkopt -fsanitize=undefined --linkopt -fsanitize-minimal-runtime
build:ubsan --copt -g
build:ubsan --copt -fno-omit-frame-pointer
build:ubsan --strip=never
# Memory sanitizer
build:msan --copt -fsanitize=memory --linkopt -fsanitize=memory
build:msan --copt -g
build:msan --copt -fno-omit-frame-pointer
build:msan --strip=never
# Thread sanitizer
build:tsan --copt -fsanitize=thread --linkopt -fsanitize=thread
build:tsan --copt -g
build:tsan --copt -fno-omit-frame-pointer
build:tsan --strip=never
# Release build (build with -O2, no asserts, and strip all symbols)
build:release --compilation_mode=opt
build:release --linkopt=-Wl,--strip-all