From 081771d4a0e9d7d3aa0eed2ef389fa4700dfb23e Mon Sep 17 00:00:00 2001 From: Googler Date: Thu, 11 Nov 2021 06:50:17 -0800 Subject: [PATCH] Adds providers back temporarily until TF can use head Adds back providers to cc_shared_library bzl file in rules_cc until TF is using bazel from head and can use the builtin cc_shared_library version. RELNOTES:none PiperOrigin-RevId: 409136047 Change-Id: I53388c18bcbc555e8a3c7edbc5e54634375f051f --- examples/experimental_cc_shared_library.bzl | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/examples/experimental_cc_shared_library.bzl b/examples/experimental_cc_shared_library.bzl index b71283a..5a37eaa 100644 --- a/examples/experimental_cc_shared_library.bzl +++ b/examples/experimental_cc_shared_library.bzl @@ -11,6 +11,36 @@ rely on this. It requires bazel >1.2 and passing the flag # used sparingly after making sure it's safe to use. LINKABLE_MORE_THAN_ONCE = "LINKABLE_MORE_THAN_ONCE" +CcSharedLibraryPermissionsInfo = provider( + "Permissions for a cc shared library.", + fields = { + "targets": "Matches targets that can be exported.", + }, +) +GraphNodeInfo = provider( + "Nodes in the graph of shared libraries.", + fields = { + "children": "Other GraphNodeInfo from dependencies of this target", + "label": "Label of the target visited", + "linkable_more_than_once": "Linkable into more than a single cc_shared_library", + }, +) +CcSharedLibraryInfo = provider( + "Information about a cc shared library.", + fields = { + "dynamic_deps": "All shared libraries depended on transitively", + "exports": "cc_libraries that are linked statically and exported", + "link_once_static_libs": "All libraries linked statically into this library that should " + + "only be linked once, e.g. because they have static " + + "initializers. If we try to link them more than once, " + + "we will throw an error", + "linker_input": "the resulting linker input artifact for the shared library", + "preloaded_deps": "cc_libraries needed by this cc_shared_library that should" + + " be linked the binary. If this is set, this cc_shared_library has to " + + " be a direct dependency of the cc_binary", + }, +) + def cc_shared_library_permissions(**kwargs): native.cc_shared_library_permissions(**kwargs)