-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
incompatible_macos_set_install_name: Set -install_name when linking dynamic libraries on macOS #12370
Comments
/cc @oquenchil @keith |
absolutely! thank you i'll take a look, cc @jayconrod |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 2+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
I just discovered this flag while working on enabling all remote tests on macOS (#23085). Without it, dylib discovery from runfiles will not work correctly for tools (see |
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
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 bazelbuild#12370 Closes bazelbuild#23089. PiperOrigin-RevId: 668228562 Change-Id: I7524679bfe8c6b8b28c0cb04f46c0d22d0adbe99
…l_name` (#23672) 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
This requires adding the `set_install_name` feature to the Unix toolchain on macOS only. The legacy install name patcher is kept around for as long as the flag can be unflipped. RELNOTES[INC]: With the default Unix toolchain on macOS, binaries now use `@rpath` to find their `.dylib` dependencies. This is required to fix issues where tools run during the build couldn't find their dynamic dependencies. Closes bazelbuild#12370 Closes bazelbuild#23090. PiperOrigin-RevId: 678780800 Change-Id: I13a1bb993c13fb2f9d7b358c2881a7ccdafe66cc
Flag:
--incompatible_macos_set_install_name
This incompatible change will add
-install_name=@rpath/<runtime_solib_name>
to the comman-line of link actions for creating dynamic libraries on macOS. This will allow us to remove the hacky wrapper scripts that rely on the runtime solibs being symlinks.Migration
TBD.
The text was updated successfully, but these errors were encountered: