Add builtin_sysroot argument to unix_cc_toolchain_config
The specified sysroot is forwarded verbatim to cc_common.create_cc_toolchain_config_info.
This allows users to use the %sysroot% placeholder in cxx_builtin_include_directories, that wasn't possible before.
See:
I did not find any tests or documentation on unix_cc_toolchain_config in the repository.
Closes
@@ -1239,6 +1239,7 @@ def _impl(ctx):
abi_version = ctx.attr.abi_version,
abi_libc_version = ctx.attr.abi_libc_version,
tool_paths = tool_paths,
+ builtin_sysroot = ctx.attr.builtin_sysroot,
)
cc_toolchain_config = rule(
@@ -1265,6 +1266,7 @@ cc_toolchain_config = rule(
"coverage_compile_flags": attr.string_list(),
"coverage_link_flags": attr.string_list(),
"supports_start_end_lib": attr.bool(),
+ "builtin_sysroot": attr.string(),
},
provides = [CcToolchainConfigInfo],
)
