mirror of https://github.com/bazelbuild/rules_cc
Remove legacy toolchain flags.
BEGIN_PUBLIC Remove legacy toolchain flags. This will allow us to enforce that users of the rule based toolchain are not using legacy toolchain resolution, and simplify toolchain creation. END_PUBLIC PiperOrigin-RevId: 640017209 Change-Id: I6ea4fad8ddf1a06ad17d706d82e54eb7f05aa6c6
This commit is contained in:
parent
0069837ab5
commit
531c9951a8
|
@ -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],
|
||||
)
|
||||
|
|
|
@ -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"],
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue