Skip to content

Commit

Permalink
Correct error runfiles cc_shared_library (#14998)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
oquenchil authored Mar 8, 2022
1 parent 5e79972 commit 78f0311
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 78f0311

Please sign in to comment.