Diff of /.bazelrc [000000] .. [5a4941]

Switch to unified view

a b/.bazelrc
1
# For more information about the format and semantics of this file, see:
2
# https://docs.bazel.build/versions/master/bazel-user-manual.html#bazelrc
3
#
4
# Test inherits all of the rules of build, so we need only specify many of
5
# our configuration options for build and they will also apply to test.
6
7
# We need the same basic configuration defined by tensorflow, plus
8
# the local configuration.  (Our WORKSPACE file assumes tensorflow is
9
# installed in a specific location, and there doesn't seem to be a
10
# way to refer to it symbolically, like BUILD files can.)
11
import %workspace%/../tensorflow/.bazelrc
12
import %workspace%/../tensorflow/.tf_configure.bazelrc
13
14
# Use 128 jobs to build. Unfortunately there doesn't seem to be any way to set
15
# the number of jobs to the number of actual cores on the machine (e.g., by
16
# looking at cpuinfo. See https://github.com/bazelbuild/bazel/issues/3814.
17
build --jobs 128
18
19
# We have to use the monolithic build configuration of TF. See internal.
20
build --config=monolithic
21
22
# A timestamp is added to each message generated by Bazel specifying the time at
23
# which the message was displayed.
24
build --show_timestamps
25
26
# Print additional information when there's a failure.
27
build --verbose_failures
28
29
# Use CPP protos for python, not the reflection ones.
30
build --define=use_fast_cpp_protos=true
31
32
# Turn off meddlesome mostly false positive warnings. Unfortunately these only
33
# affect the Nucleus build itself, not our deps, which is where most of the
34
# problems are coming from.
35
#
36
# These are largely errors due to protobuf.size(). We want to see them in our
37
# own build.
38
# build --copt="-Wno-sign-compare"
39
40
# These are essentially all false positives from our CLIF bindings, we disable
41
# them in our own build.
42
build --copt="-Wno-maybe-uninitialized"
43
build --copt="-Wno-unused-function"
44
45
# Set c++ version.
46
build --cxxopt="-std=c++17"
47
48
# These are errors coming from the protobuf library itself. We'd like to see
49
# them in our own build.
50
# build --copt="-Wno-write-strings"
51
52
# Errors sends combined stdout/stderr output from failed tests only into the
53
# stdout immediately after test is completed, ensuring that test output from
54
# simultaneous tests is not interleaved with each other. Prints a summary at the
55
# build as per summary output above.
56
test --test_output=errors
57
58
# Until https://github.com/bazelbuild/bazel/issues/4815 is fixed, we need
59
# to force the use of our py_runtime.
60
# Versions of bazel used by TensorFlow 2.1+ disable the use of --python_top by
61
# default with the below error message, necessitating the additional flag.
62
#  "ERROR: `--python_top` is disabled by `--incompatible_use_python_toolchains`.
63
#    Instead of configuring the Python runtime directly, register a Python
64
#    toolchain. See https://github.com/bazelbuild/bazel/issues/7899. You can
65
#    temporarily revert to the legacy flag-based way of specifying toolchains by
66
#    setting `--incompatible_use_python_toolchains=false`."
67
build --python_top=//:deepvariant_python_runtime --incompatible_use_python_toolchains=false