forked from beancount/beancount
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
49 lines (40 loc) · 1.73 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
# Allow my global ledger variable to pass through for some experimental tests.
build --test_env=L
# Use Clang to build, not gcc.
build --repo_env=CC=cc
build --repo_env=CXX=c++
# Use C++17 w/ libc++ (for std::string_view and more).
build --cxxopt=-std=c++17
# Use LLVM's more modern libc++ instead of GNU libstdc++
## BAZEL_CXXOPTS="-stdlib=libc++:-isystem$INSTALL_DIR/include" \
## BAZEL_LINKOPTS="-stdlib=libc++" \
## BAZEL_LINKLIBS="-L$INSTALL_DIR/lib:-Wl,-rpath,$INSTALL_DIR/lib:-lc++:-lm" \
## build --cxxopt=-isystem/usr/lib/llvm-12/include/c++/v1
# build --cxxopt=-stdlib=libc++
# build --cxxopt=-L/usr/lib/llvm-12/lib
# We need this to build Riegeli; see https://github.com/google/riegeli/issues/13
build --cxxopt=-fsized-deallocation
build -c fastbuild
## Make Python protos faster by backing them with C++ protos.
build --define=use_fast_cpp_protos=true
# Set location of Python installation (read by python_configure.bzl).
#build --python_path=/usr/bin/python3
#build --repo_env=PYTHON_BIN_PATH=/usr/bin/python3
# Side-step an issue that needs to be looked at later.
#
# Error in create_linking_context: in call to create_linking_context(),
# parameter 'user_link_flags' is deprecated and will be removed soon. It may be
# temporarily re-enabled by setting
# --incompatible_require_linker_input_cc_api=false
#
# TODO(blais): Update rules_foreign_cc.
build --incompatible_require_linker_input_cc_api=false
# Add address sanitizer support.
# Run like this: bazel test -c dbg --config=asan //beancount/{cparser,ccore}:all``
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