diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 9e66335..5d8f4a4 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -5,12 +5,14 @@ build_targets: &build_targets - "//examples/..." - "//tests/..." - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux + - "-//tests/rule_based_toolchain/tool_map:_duplicate_action_test_subject" # Intentionally broken rule. test_targets: &test_targets - "//:all" - "//cc/..." - "//examples/..." - "//tests/..." - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux + - "-//tests/rule_based_toolchain/tool_map:_duplicate_action_test_subject" # Intentionally broken rule. build_targets_bazel_6: &build_targets_bazel_6 - "//:all" @@ -20,6 +22,7 @@ build_targets_bazel_6: &build_targets_bazel_6 - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None - "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6 + - "-//tests/rule_based_toolchain/tool_map:_duplicate_action_test_subject" # Intentionally broken rule. test_targets_bazel_6: &test_targets_bazel_6 - "//:all" - "//cc:all" @@ -28,6 +31,7 @@ test_targets_bazel_6: &test_targets_bazel_6 - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//tests/rule_based_toolchain/..." # proto.encode_text doesn't support None - "-//cc:optional_current_cc_toolchain" # Not supported in Bazel 6 + - "-//tests/rule_based_toolchain/tool_map:_duplicate_action_test_subject" # Intentionally broken rule. buildifier: version: latest @@ -75,6 +79,7 @@ tasks: - "//tests/..." - "-//examples/custom_toolchain:legacy_selector" # Example only works on Linux - "-//tests/system_library:system_library_test" # Fails because of repo setup + - "-//tests/rule_based_toolchain/tool_map:_duplicate_action_test_subject" # Intentionally broken rule. macos_head: name: MacOS (Bazel HEAD) bazel: last_green diff --git a/cc/private/toolchain/BUILD.tpl b/cc/private/toolchain/BUILD.tpl index 2f97707..522d67e 100644 --- a/cc/private/toolchain/BUILD.tpl +++ b/cc/private/toolchain/BUILD.tpl @@ -69,11 +69,6 @@ filegroup( srcs = glob(["extra_tools/**"], allow_empty = True) + [%{cc_compiler_deps}], ) -filegroup( - name = "ar_files", - srcs = [":compiler_deps"] + [%{ar_deps}], -) - # This is the entry point for --crosstool_top. Toolchains are found # by lopping off the name of --crosstool_top and searching for # the "${CPU}" entry in the toolchains attribute. diff --git a/cc/private/toolchain/unix_cc_configure.bzl b/cc/private/toolchain/unix_cc_configure.bzl index 935fa58..6a6f38a 100644 --- a/cc/private/toolchain/unix_cc_configure.bzl +++ b/cc/private/toolchain/unix_cc_configure.bzl @@ -629,8 +629,9 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overridden_tools): ":builtin_include_directory_paths", ":cc_wrapper", ":deps_scanner_wrapper", - ]), - "%{ar_deps}": get_starlark_list([":validate_static_library"] if "validate_static_library" in tool_paths else []), + ] + ( + [":validate_static_library"] if "validate_static_library" in tool_paths else [] + )), "%{cc_toolchain_identifier}": cc_toolchain_identifier, "%{compile_flags}": get_starlark_list( [