Skip to content

Commit fe0eac1

Browse files
authored
Add options to, and slightly reorganize, .bazelrc (#720)
1 parent f8a4064 commit fe0eac1

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

.bazelrc

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,33 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Common flags
16+
common --announce_rc
17+
common --experimental_repo_remote_exec
18+
common --verbose_failures
19+
120
# Default build options
221
build --copt -std=c++17
322
build --copt -D_GLIBCXX_USE_CXX11_ABI=1
4-
build --experimental_repo_remote_exec
23+
24+
# Test flags
25+
test --test_output=errors
26+
27+
# CUDA options
28+
build:cuda --@local_config_cuda//:enable_cuda
29+
build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true
30+
531

632
##### Sanitizers (choose one, or nosan for none) #####
733

@@ -23,6 +49,7 @@ build:msan --linkopt -fsanitize=leak
2349
# No sanitizers
2450
build:nosan --
2551

52+
2653
##### Instruction set options (choose one) #####
2754

2855
# Build with AVX2 + FMA
@@ -37,6 +64,7 @@ build:sse --copt -msse4
3764
# Build without AVX or SSE
3865
build:basic --copt -O3
3966

67+
4068
##### Parallelization (choose one, or nopenmp for none) #####
4169

4270
# Build with OpenMP
@@ -53,10 +81,3 @@ build:tcmalloc --linkopt="-ltcmalloc"
5381

5482
# Build using malloc (default)
5583
build:malloc --
56-
57-
# Test flags
58-
test --test_output=errors
59-
60-
# CUDA options
61-
build:cuda --@local_config_cuda//:enable_cuda
62-
build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true

0 commit comments

Comments
 (0)