-
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
5.x: Use .dylib extension for macOS dynamic libraries in Unix toolchain #14360
Conversation
The autoconfigured Unix toolchain previously did not set any artifact_name_patterns, which meant that all artifacts used the default(Linux) patterns. This was incorrect in the case of dynamic libraries on macOS, which should have the extension `.dylib` rather than `.so`. Fixes bazelbuild#11082. Closes bazelbuild#14158. PiperOrigin-RevId: 413363126 (cherry picked from commit 3f1672e)
cc: @meteorcloudy |
Actually, let's wait for #14354 to be merged a well, and get both in at once. |
Please ping me again when it's ready |
@meteorcloudy @brentleyjones Added #14369 with the second half of the fix. |
Looks like this is already breaking rules_foreign_cc in downstream |
How much of a breaking change is this and how beneficial is it? It might be a bit too late for 5.x. |
It changes the output name of shared library All in all, I agree that this may be too late for Bazel 5. |
@fmeum Yeah, this change is definitely nice to have to fix the wrong name, but we probably want to give downstream more time to migrate and fix the incompatibilities. Thanks for your understanding! |
Just for the record: Submitted bazel-contrib/rules_foreign_cc#834 to fix the issue before it becomes a failure. |
Is there still a mechanism to compile a shared library with a
|
would still work, as long as the target name already ending with a dynamic library extension ( |
The autoconfigured Unix toolchain previously did not set any artifact_name_patterns, which meant that all artifacts used the default(Linux) patterns. This was incorrect in the case of dynamic libraries on macOS, which should have the extension
.dylib
rather than.so
.Fixes #11082.
Closes #14158.
PiperOrigin-RevId: 413363126
(cherry picked from commit 3f1672e)