-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cc_shared_library
dependency of cc_test
results in redundant shared objects in runfiles
#21833
Comments
passing |
cc @pzembrod for triage |
Very likely that this must be fixed on the |
If this affects |
Simplifies the test of `cc_shared_library`'s runfiles behavior using new rules_testing features, which also result in better failure messages. Also format `BUILD.builtin_test` with buildifier to simplify future contributions. Work towards #21833 Closes #21880. PiperOrigin-RevId: 626315579 Change-Id: Ib7b3d1367586ba7215132d6a9f3711f4ae0a9b09
Simplifies the test of `cc_shared_library`'s runfiles behavior using new rules_testing features, which also result in better failure messages. Also format `BUILD.builtin_test` with buildifier to simplify future contributions. Work towards bazelbuild#21833 Closes bazelbuild#21880. PiperOrigin-RevId: 626315579 Change-Id: Ib7b3d1367586ba7215132d6a9f3711f4ae0a9b09
Simplifies the test of `cc_shared_library`'s runfiles behavior using new rules_testing features, which also result in better failure messages. Also format `BUILD.builtin_test` with buildifier to simplify future contributions. Work towards bazelbuild#21833 Closes bazelbuild#21880. PiperOrigin-RevId: 626315579 Change-Id: Ib7b3d1367586ba7215132d6a9f3711f4ae0a9b09
Simplifies the test of `cc_shared_library`'s runfiles behavior using new rules_testing features, which also result in better failure messages. Also format `BUILD.builtin_test` with buildifier to simplify future contributions. Work towards bazelbuild#21833 Closes bazelbuild#21880. PiperOrigin-RevId: 626315579 Change-Id: Ib7b3d1367586ba7215132d6a9f3711f4ae0a9b09
Simplifies the test of `cc_shared_library`'s runfiles behavior using new rules_testing features, which also result in better failure messages. Also format `BUILD.builtin_test` with buildifier to simplify future contributions. Work towards bazelbuild#21833 Closes bazelbuild#21880. PiperOrigin-RevId: 626315579 Change-Id: Ib7b3d1367586ba7215132d6a9f3711f4ae0a9b09
When loaded as a `data` dependency (e.g. for `dlopen`), the runfiles of a `cc_shared_library` now contain the `_solib` symlinks of precompiled dynamic library dependencies instead of the symlink targets. Work towards #21833 Closes #21882. PiperOrigin-RevId: 637807250 Change-Id: I7ea2858c8cc9b5072beecf01d9dd49f8385aaebd
When loaded as a `data` dependency (e.g. for `dlopen`), the runfiles of a `cc_shared_library` now contain the `_solib` symlinks of precompiled dynamic library dependencies instead of the symlink targets. Work towards bazelbuild#21833 Closes bazelbuild#21882. PiperOrigin-RevId: 637807250 Change-Id: I7ea2858c8cc9b5072beecf01d9dd49f8385aaebd
When loaded as a `data` dependency (e.g. for `dlopen`), the runfiles of a `cc_shared_library` now contain the `_solib` symlinks of precompiled dynamic library dependencies instead of the symlink targets. Work towards #21833 Closes #21882. PiperOrigin-RevId: 637807250 Change-Id: I7ea2858c8cc9b5072beecf01d9dd49f8385aaebd Commit 75e5d2f Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Description of the bug:
When a
cc_test
depends on acc_shared_library
, it correctly links against thecc_shared_library
. However, thecc_library
shared object still ends up in runfiles. This results in building all of the (transitive) dependencies twice.Which category does this issue belong to?
C++ Rules
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
https://github.com/brians-neptune/bazel-cc_shared_library-cc_test has a pretty minimal example. Here's the
BUILD
file, all the C/C++ files are empty (except for an emptymain
intest.cc
):liblibdep.so
andlibdep_shared.so
are both in runfiles:but only
libdep_shared.so
is actually used:Which operating system are you running Bazel on?
Ubuntu 22.04
What is the output of
bazel info release
?release 7.0.2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: