[7.4.0] Fix runtime_solib_name
for --incompatible_macos_set_install_name
#23672
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.
The
runtime_solib_name
link variable had an incorrect value in the case of a transitive dynamic library. Since non-transitive ("nodeps") dynamic libraries are no longer used on macOS, the--incompatible_macos_set_install_name
flag didn't have any positive effect.This PR is intentionally limited to the fix so that it can be cherry-picked into Bazel 7, where it can make the incompatible flag work with the
apple_support
toolchain. A follow-up PR will add the feature to the Unix toolchain and flip the incompatible flag for Bazel 8.Work towards #12370
Closes #23089.
PiperOrigin-RevId: 668228562
Change-Id: I7524679bfe8c6b8b28c0cb04f46c0d22d0adbe99
Fixes #23185