Conversation
current_py_cc_libs forwards CcInfo from the selected Python toolchain, but the linker inputs retain their original owner labels. cc_shared_library does not visit those labels through the toolchain and silently omits static libraries from its link. Return CcSharedLibraryHintInfo with the forwarded owner labels. Add a rules_testing regression using a static library supplied through a py_cc_toolchain. Validation: the regression fails before this change; all three current_py_cc_libs analysis tests pass afterward on Bazel 9.1.1. buildifier and git diff --check pass.
The analysis transition replaces --extra_toolchains, removing the C++ toolchain supplied by remote CI. When C++ auto-detection is disabled, cc_shared_library then fails before the regression assertion can run. Register the existing C++ test toolchains along with the Python test toolchain. The static-library assertion remains unchanged. Validation: reproduced the missing C++ toolchain error on Bazel 8.6.0 with a Linux target platform and auto-detection disabled; the same test passes after the change. All three current_py_cc_libs analysis tests also pass on the host platform.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
current_py_cc_libsforwards linker inputs with the Python toolchain library's owner labels.cc_shared_librarydoes not discover those labels through the toolchain, so it silently omits the static libraries. ReturnCcSharedLibraryHintInfowith the forwarded owner labels.Validation: added a
rules_testingregression with a static library supplied throughpy_cc_toolchain. It fails before the fix; all threecurrent_py_cc_libsanalysis tests pass afterward on Bazel 9.1.1.