The Bazel team is happy to announce a new version of Bazel, Bazel 0.19.
This document lists the major changes since Bazel 0.18.
General changes
The
--incompatible_expand_directories
flag automatically expands directories in command lines. See the design document.The
--loading_phase_threads
flag now defaults toauto
instead of 200, which at the moment corresponds to the number of CPUs. This is appropriate for most users. However, if your sources reside on a network file system, increasing this value may yield better analysis-time performance when disk caches are cold.
Android
- Fixed missing debug symbols when building native code with
--compilation_mode=dbg
that target Android ARM architectures by adding the-g
flag.
C++
Added
--incompatible_disable_legacy_flags_cc_toolchain_api
to deprecate legacycc_toolchain
Starlark API for legacyCROSSTOOL
fields. Tracking issue is #6434. See the instructions for migration.Runfiles in
cc_test
: the C++ runfiles library (@bazel_tools//tools/cpp/runfiles
) can now create Runfiles objects for tests. See//tools/cpp/runfiles/runfiles_src.h
in the Bazel source tree for documentation.:cc_binary
link action no longer hardcodes-static-libgcc
for toolchains that support embedded runtimes (guarded by--experimental_dont_emit_static_libgcc
temporarily).The flag
--experimental_enable_cc_configuration_make_variables
is removed, use--incompatible_disable_cc_configuration_make_variables
instead.
Java
- Bazel now requires a JDK to be installed as it no longer falls back to the internal JDK if the
--javabase
flag is not set. Instead, Bazel now searches for a JDK within theJAVA_HOME
andPATH
environment variables. If Bazel cannot find a JDK, it will not be able to run Java builds.
Code Coverage
- LcovMerger was renamed to CoverageOutputGenerator. Please use
--coverage_report_generator=@bazel_tools//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:Main
instead of the previous
--coverage_report_generator=@bazel_tools//tools/test/LcovMerger/java/com/google/devtools/lcovmerger:Main
- You can now enable a new coverage method for C++ rules that use gcc with the
--experimental_cc_coverage
flag. The flag will use gcov instead of lcov to collect coverage information. This new implementation fixes some of the C++ coverage correctness issues ( respecting--instrumentation_filter
and--instrument_test_targets
flags ). There have been observed faster clean and incremental times when invoking bazel coverage ( small overhead compared to test runtimes instead of 2x test runtime ), but more measurements need to be done.
Other Changes
Add
--apple_compiler
and--apple_grte_top options
. These provide the equivalent of--compiler
/--grte_top
for the toolchain configured in--apple_crosstool_top
.There is now a
same_pkg_direct_rdeps()
query function.Bazel now propagates remote errors to the user even if
--verbose_failures=false
is set.The number of configured targets is now shown in the analysis phase status output.
Bazel will now check stderr instead of stdout to decide if it is outputting to a terminal.
--isatty
is deprecated, use--is_stderr_atty
instead.
Future Changes
We will do incompatible changes in Bazel 0.20. We encourage you to migrate in advance (or report any migration difficulty) with the following flags:
--incompatible_disable_late_bound_option_defaults
--incompatible_disable_depset_in_cc_user_flags
--incompatible_disable_cc_toolchain_label_from_crosstool_proto
--incompatible_disable_cc_configuration_make_variables
--incompatible_disable_legacy_cpp_toolchain_skylark_api
--incompatible_disable_legacy_flags_cc_toolchain_api
--incompatible_remove_native_git_repository
--incompatible_remove_native_http_archive
--incompatible_disallow_conflicting_providers
--incompatible_range_type
Thank you to our contributors!
This release contains contributions from many people at Google, as well as Andreas Herrmann, Andreas Hippler, Benjamin Peterson, David Ostrovsky, Ed Baunton, George Gensure, Igal Tabachnik, Jason Gavris, Loo Rong Jie, rmalik, and Yannic Bonenberger
Thank you to everyone who contributed to this release!