Skip to content
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

Use .dylib extension for macOS dynamic libraries in XCode toolchain #14369

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Dec 3, 2021

This is a follow-up to #14158.

Fixes #11082.

Closes #14354.

PiperOrigin-RevId: 413885597
(cherrypicked from 6e1b440)

This is a follow-up to bazelbuild#14158.

Fixes bazelbuild#11082.

Closes bazelbuild#14354.

PiperOrigin-RevId: 413885597
(cherrypicked from 6e1b440)
@google-cla google-cla bot added the cla: yes label Dec 3, 2021
@fmeum
Copy link
Collaborator Author

fmeum commented Dec 3, 2021

@meteorcloudy Could you merge #14360 and this PR for Bazel 5?

@meteorcloudy
Copy link
Member

@oquenchil Is this change safe to get into 5.0?

@meteorcloudy
Copy link
Member

We decided not to merge this for 5.0, see #14360 (comment)

fmeum added a commit to CodeIntelligenceTesting/rules_foreign_cc that referenced this pull request Dec 6, 2021
…acOS

As of bazelbuild/bazel#14369, shared libraries
produced with cc_binary on macOS with the auto-configured toolchain use
the correct file extension for dynamic libraries
(.dylib rather than .so). This requires adapting a test.
fmeum added a commit to CodeIntelligenceTesting/rules_foreign_cc that referenced this pull request Dec 6, 2021
As of bazelbuild/bazel#14369, shared libraries
produced with cc_binary on macOS with the auto-configured toolchain use
the correct file extension for dynamic libraries
(.dylib rather than .so). This requires adapting a test.
@jsharpe
Copy link
Contributor

jsharpe commented Dec 6, 2021

@meteorcloudy just so you're aware on macOS python C extensions require a .so extension so if this PR means that this can no longer be created then this is a regression and breaking change for anyone compiling python extensions on macOS.

@meteorcloudy
Copy link
Member

meteorcloudy commented Dec 6, 2021

I believe even with this PR, you can still create a shared library with a explicit .so extension with cc_binary on macOS.

@fmeum fmeum deleted the xcode_toolchain_dylib branch December 6, 2021 17:04
UebelAndre pushed a commit to bazel-contrib/rules_foreign_cc that referenced this pull request Dec 6, 2021
As of bazelbuild/bazel#14369, shared libraries
produced with cc_binary on macOS with the auto-configured toolchain use
the correct file extension for dynamic libraries
(.dylib rather than .so). This requires adapting a test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants