diff --git a/cc/toolchains/impl/toolchain_config.bzl b/cc/toolchains/impl/toolchain_config.bzl index 82e6695..656964d 100644 --- a/cc/toolchains/impl/toolchain_config.bzl +++ b/cc/toolchains/impl/toolchain_config.bzl @@ -85,12 +85,13 @@ def _cc_toolchain_config_impl(ctx): # in an error that it expected a string, and for safety's sake, I'd # prefer to provide something unique. toolchain_identifier = str(ctx.label), - target_system_name = ctx.attr.target_system_name, - target_cpu = ctx.attr.target_cpu, - target_libc = ctx.attr.target_libc, - compiler = ctx.attr.compiler, - abi_version = ctx.attr.abi_version, - abi_libc_version = ctx.attr.abi_libc_version, + # These fields are only relevant for legacy toolchain resolution. + target_system_name = "", + target_cpu = "", + target_libc = "", + compiler = "", + abi_version = "", + abi_libc_version = "", builtin_sysroot = sysroot, ), # This allows us to support all_files. @@ -116,15 +117,6 @@ cc_toolchain_config = rule( # Attributes translated from legacy cc toolchains. "sysroot": attr.label(providers = [DirectoryInfo]), "cxx_builtin_include_directories": attr.label_list(providers = [DirectoryInfo]), - - # TODO: remove these fields. I'm pretty sure they're unnecessary with - # --incompatible_enable_cc_toolchain_resolution. - "target_system_name": attr.string(), - "target_cpu": attr.string(), - "target_libc": attr.string(), - "compiler": attr.string(mandatory = True), - "abi_version": attr.string(), - "abi_libc_version": attr.string(), }, provides = [ToolchainConfigInfo], ) diff --git a/tests/rule_based_toolchain/toolchain_config/BUILD b/tests/rule_based_toolchain/toolchain_config/BUILD index 3fac686..bb01110 100644 --- a/tests/rule_based_toolchain/toolchain_config/BUILD +++ b/tests/rule_based_toolchain/toolchain_config/BUILD @@ -46,15 +46,11 @@ util.helper_target( name = "collects_files_toolchain_config", action_type_configs = [":compile_config"], args = [":c_compile_args"], - compiler = "gcc-4.1.1", cxx_builtin_include_directories = [ "//tests/rule_based_toolchain/testdata:directory", ], skip_experimental_flag_validation_for_test = True, sysroot = "//tests/rule_based_toolchain/testdata:directory", - target_cpu = "k8", - target_libc = "glibc-2.2.2", - target_system_name = "local", toolchain_features = [":compile_feature"], )