bazel
bazel copied to clipboard
Sunset C++ toolchain legacy features
From https://bazel.build/versions/6.2.0/docs/cc-toolchain-config-reference#legacy-features-patching-logic:
This is a long list of features. The plan is to get rid of them once Crosstool in Starlark is done.
Most of the legacy features are migrated to Starlark. We should consider sunsetting these legacy features when possible.
The pain point with legacy features is that it's sometime a mystery which features are enabled.
For example, sysroot is enabled in Starlark and Java (bazel). If we implement a custom C++ toolchain using unix_cc_toolchain_config.bzl as an example, removing sysroot feature will still result in --sysroot flag in compiler flags which is a bit surprising.