This repository has been archived by the owner on Jul 8, 2021. It is now read-only.
/
.bazelrc
104 lines (88 loc) · 4.09 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Copyright 2019 Tetrate
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Envoy specific Bazel build/test options.
# Bazel doesn't need more than 200MB of memory based on memory profiling:
# https://docs.bazel.build/versions/master/skylark/performance.html#memory-profiling
# Limiting JVM heapsize here to let it do GC more when approaching the limit to
# leave room for compiler/linker.
startup --host_jvm_args=-Xmx512m
build --workspace_status_command=bazel/get_workspace_status
build --experimental_remap_main_repo
# Basic ASAN/UBSAN that works for gcc
build:asan --define ENVOY_CONFIG_ASAN=1
build:asan --copt -fsanitize=address,undefined
build:asan --linkopt -fsanitize=address,undefined
build:asan --copt -fno-sanitize=vptr
build:asan --linkopt -fno-sanitize=vptr
build:asan --linkopt -ldl
build:asan --define tcmalloc=disabled
build:asan --build_tag_filters=-no_asan
build:asan --test_tag_filters=-no_asan
build:asan --define signal_trace=disabled
build:asan --copt -DADDRESS_SANITIZER=1
build:asan --copt -D__SANITIZE_ADDRESS__
build:asan --test_env=ASAN_OPTIONS=handle_abort=1:allow_addr2line=true:check_initialization_order=true:strict_init_order=true
build:asan --test_env=ASAN_SYMBOLIZER_PATH
# Clang ASAN/UBSAN
build:clang-asan --config=asan
# macOS ASAN/UBSAN
build:macos-asan --config=asan
# Workaround, see https://github.com/bazelbuild/bazel/issues/6932
build:macos-asan --copt -Wno-macro-redefined
build:macos-asan --copt -D_FORTIFY_SOURCE=0
# Clang TSAN
build:clang-tsan --define ENVOY_CONFIG_TSAN=1
build:clang-tsan --copt -fsanitize=thread
build:clang-tsan --linkopt -fsanitize=thread
build:clang-tsan --define tcmalloc=disabled
# Clang MSAN - broken today since we need to rebuild lib[std]c++ and external deps with MSAN
# support (see https://github.com/envoyproxy/envoy/issues/443).
build:clang-msan --define ENVOY_CONFIG_MSAN=1
build:clang-msan --copt -fsanitize=memory
build:clang-msan --linkopt -fsanitize=memory
build:clang-msan --define tcmalloc=disabled
build:clang-msan --copt -fsanitize-memory-track-origins=2
# Clang with libc++
build:libc++ --action_env=CC
build:libc++ --action_env=CXX
build:libc++ --action_env=CXXFLAGS=-stdlib=libc++
build:libc++ --action_env=PATH
build:libc++ --define force_libcpp=enabled
# Test options
test --test_env=HEAPCHECK=normal --test_env=PPROF_PATH
# GetEnvoy options
build --strip=never --copt=-ggdb3
build:release --compilation_mode=opt
build:release-fips --config=release
build:release-fips --define boringssl=fips
test --test_env=ENVOY_IP_TEST_VERSIONS=v4only
# GetEnvoy variants
build:envoy --incompatible_bzl_disallow_load_after_statement=false
build:istio-proxy --incompatible_depset_union=false --incompatible_bzl_disallow_load_after_statement=false
# GetEnvoy distributions
build:alpine --define=tcmalloc=disabled --define=signal_trace=disabled
build:alpine --linkopt -static --linkopt -lexecinfo --linkopt -Wl,--allow-multiple-definition
build:alpine --linkopt -fuse-ld=gold
build:centos --action_env=PATH=/opt/llvm/bin:/opt/rh/devtoolset-7/root/usr/bin:/opt/rh/rh-git218/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
build:centos --linkopt=-fuse-ld=lld
build:centos --action_env=CC=clang
build:centos --action_env=CXX=clang++
build:centos --action_env=CXXFLAGS=-stdlib=libc++
build:centos --define force_libcpp=enabled
build:ubuntu-xenial --action_env=path=/usr/lib/llvm-8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
build:ubuntu-xenial --linkopt=-fuse-ld=lld
build:ubuntu-xenial --action_env=cc=clang
build:ubuntu-xenial --action_env=cxx=clang++
# This is no-op but if this doesn't exist bazel will error with non-exist config
build:darwin --announce_rc