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_directoriesflag automatically expands directories in command lines. See the design document.The
--loading_phase_threadsflag now defaults toautoinstead 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=dbgthat target Android ARM architectures by adding the-gflag.
C++
Added
--incompatible_disable_legacy_flags_cc_toolchain_apito deprecate legacycc_toolchainStarlark API for legacyCROSSTOOLfields. 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.hin the Bazel source tree for documentation.:cc_binarylink action no longer hardcodes-static-libgccfor toolchains that support embedded runtimes (guarded by--experimental_dont_emit_static_libgcctemporarily).The flag
--experimental_enable_cc_configuration_make_variablesis removed, use--incompatible_disable_cc_configuration_make_variablesinstead.
Java
- Bazel now requires a JDK to be installed as it no longer falls back to the internal JDK if the
--javabaseflag is not set. Instead, Bazel now searches for a JDK within theJAVA_HOMEandPATHenvironment 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_coverageflag. 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_filterand--instrument_test_targetsflags ). 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_compilerand--apple_grte_top options. These provide the equivalent of--compiler/--grte_topfor 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=falseis 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.
--isattyis deprecated, use--is_stderr_attyinstead.
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!