-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
42 lines (35 loc) · 1.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
build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
build:clang --repo_env=CC=clang
build:clang --copt=-std=c++17
build:clang --cuda_compiler=clang
# Compile CUDA op kernels with clang
build:cuda_clang --@rules_cuda//cuda:compiler=clang
build:cuda_clang --@rules_cuda//cuda:copts=-Wno-unknown-cuda-version
# Compile CUDA op kernels with nvcc
build:cuda_nvcc --@rules_cuda//cuda:compiler=nvcc
build:cuda_nvcc --@rules_cuda//cuda:copts=-allow-unsupported-compiler,--default-stream=per-thread
build:cpu --@rules_cuda//cuda:enable=False
build:gpu --@rules_cuda//cuda:enable=True
# +------------------------------------------------------------+
# | CPP Lint Tests & Unit Tests |
# +------------------------------------------------------------+
# By default, cpplint tests are run as part of `bazel test` alongside all of
# the other compilation and test targets. This is a convenience shortcut to
# only do the cpplint testing and nothing else.
# Do bazel test --config=cpplint <target> to enable this configuration.
# To enable the lint test, the BUILD *must* load the cpplint.bzl by having
# 'load("//tools:cpplint.bzl", "cpplint")' at the beginning and 'cpplint()'
# at the end.
test:cpplint --test_tag_filters=cpplint
test:cpplint --build_tests_only
test:cpplint --test_timeout=3600
test:cpplint --flaky_test_attempts=1
# Regular unit tests.
test:unit_test --test_tag_filters=-cpplint
# Coverage tests
coverage --test_tag_filters=-cpplint
# load bazelrc from the legacy location
# as recommended in https://github.com/bazelbuild/bazel/issues/6319
try-import %workspace%/ci.bazelrc
try-import %workspace%/user.bazelrc