Skip to content

Commit 78f0311

Browse files
authored
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
1 parent 5e79972 commit 78f0311

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/starlark/builtins_bzl/common/cc/experimental_cc_shared_library.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ def _cc_shared_library_impl(ctx):
507507
if precompiled_dynamic_library.resolved_symlink_dynamic_library != None:
508508
precompiled_only_dynamic_libraries_runfiles.append(precompiled_dynamic_library.resolved_symlink_dynamic_library)
509509

510+
runfiles = runfiles.merge(ctx.runfiles(files = precompiled_only_dynamic_libraries_runfiles))
511+
510512
return [
511513
DefaultInfo(
512514
files = depset(library),

0 commit comments

Comments
 (0)