From 36fa03ec71b0e9eddfa31f8dca22ced2e723c1af Mon Sep 17 00:00:00 2001 From: oquenchil <23365806+oquenchil@users.noreply.github.com> Date: Wed, 26 Jul 2023 15:40:50 +0200 Subject: [PATCH 1/2] Advertise CcInfo from cc_import Fixes #19056 --- src/main/starlark/builtins_bzl/common/cc/cc_import.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/starlark/builtins_bzl/common/cc/cc_import.bzl b/src/main/starlark/builtins_bzl/common/cc/cc_import.bzl index babfb2b40c989e..b7c7ff8df636c7 100644 --- a/src/main/starlark/builtins_bzl/common/cc/cc_import.bzl +++ b/src/main/starlark/builtins_bzl/common/cc/cc_import.bzl @@ -220,6 +220,7 @@ cc_import = rule( ), "_cc_toolchain": attr.label(default = "@" + semantics.get_repo() + "//tools/cpp:current_cc_toolchain"), }, + provides = [CcInfo], toolchains = cc_helper.use_cpp_toolchain(), fragments = ["cpp"], incompatible_use_toolchain_transition = True, From 0b2655c9c57d7103562b1d93064597535bfb9020 Mon Sep 17 00:00:00 2001 From: oquenchil <23365806+oquenchil@users.noreply.github.com> Date: Wed, 26 Jul 2023 15:43:10 +0200 Subject: [PATCH 2/2] Update BUILD.builtin_test --- .../test_cc_shared_library/BUILD.builtin_test | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/starlark/tests/builtins_bzl/cc/cc_shared_library/test_cc_shared_library/BUILD.builtin_test b/src/main/starlark/tests/builtins_bzl/cc/cc_shared_library/test_cc_shared_library/BUILD.builtin_test index 952dea0c426454..196231642e74e2 100644 --- a/src/main/starlark/tests/builtins_bzl/cc/cc_shared_library/test_cc_shared_library/BUILD.builtin_test +++ b/src/main/starlark/tests/builtins_bzl/cc/cc_shared_library/test_cc_shared_library/BUILD.builtin_test @@ -405,12 +405,10 @@ paths_test( name = "path_matching_test", ) -cc_library( +cc_import( name = "prebuilt", hdrs = ["direct_so_file_cc_lib.h"], - srcs = [ - ":just_main_output", - ], + shared_library = ":just_main_output", ) filegroup(