From 78f03110e0dab42f37e427fd524e72706e036d74 Mon Sep 17 00:00:00 2001 From: oquenchil <23365806+oquenchil@users.noreply.github.com> Date: Tue, 8 Mar 2022 15:31:47 +0100 Subject: [PATCH] Correct error runfiles cc_shared_library (#14998) Fix runfiles in cc_shared_library #1494 misses a key part which was to actually add the precompiled libraries to the runfiles provider. There was a test but this used a cc_binary which gave the false sense of things working correctly since the cc_binary is able to get the runfiles from the CcInfo and add it itself. Changed test to use a py_test instead. Cherrypick of 426188c --- .../builtins_bzl/common/cc/experimental_cc_shared_library.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/starlark/builtins_bzl/common/cc/experimental_cc_shared_library.bzl b/src/main/starlark/builtins_bzl/common/cc/experimental_cc_shared_library.bzl index 4708a8490fe4f7..9237058ab0a5e2 100644 --- a/src/main/starlark/builtins_bzl/common/cc/experimental_cc_shared_library.bzl +++ b/src/main/starlark/builtins_bzl/common/cc/experimental_cc_shared_library.bzl @@ -507,6 +507,8 @@ def _cc_shared_library_impl(ctx): if precompiled_dynamic_library.resolved_symlink_dynamic_library != None: precompiled_only_dynamic_libraries_runfiles.append(precompiled_dynamic_library.resolved_symlink_dynamic_library) + runfiles = runfiles.merge(ctx.runfiles(files = precompiled_only_dynamic_libraries_runfiles)) + return [ DefaultInfo( files = depset(library),