-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add versioned soname support to interface_library #16100
base: master
Are you sure you want to change the base?
Add versioned soname support to interface_library #16100
Conversation
8e9315e
to
52387b5
Compare
52387b5
to
c0ca3db
Compare
@@ -57,6 +57,10 @@ def _perform_error_checks( | |||
not cc_helper.is_shared_library_extension_valid(shared_library_artifact.basename)): | |||
fail("'shared_library' does not produce any cc_import shared_library files (expected .so, .dylib or .dll)") | |||
|
|||
if (interface_library_artifact != None and | |||
not cc_helper.is_interface_library_extension_valid(interface_library_artifact.basename)): | |||
fail("'interface_library' does not produce any cc_import interface_library files (expected .ifso, .tbd, .dll.a, .dylib, .so, or .lib)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comma before "or" for consistency.
@@ -532,6 +532,9 @@ def _is_versioned_shared_library_extension_valid(shared_library_name): | |||
return True | |||
return False | |||
|
|||
def _is_versioned_shared_library_extension_valid(shared_library_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding this, could we rename _is_versioned_shared_library_extension_valid to _is_versioned_library_extension_valid and do a minor refactoring in cc_helper.bzl? _is_versioned_shared_library_extension_valid is private and not exported so it should just touch one file.
2825199
to
af98999
Compare
Hello @m3rcuriel, Could you please fix the buildkite errors. Above PR is awaiting to merge. Thanks! |
Does this allow linking two versions of the same library? I'm seeing this issue when doing so:
The same example can be linked successfully outside of Bazel. |
Hi @m3rcuriel, Could you provide an update on this PR? |
There doesn't seem to be a compelling reason to not support this, and there's no other way (it seems) to allow one to provide a shim (with a versioned filename) that won't end up in the runfiles tree.
This mostly consists of adding the
VERSIONED_SHARED_LIBRARY
support through to theinterface_library
and has the practical effect of allowing.dylib.VERSION
and.so.VERSION
for that field. I don't know enough aboutsoname
/versioning/Windows to claim confidently that these are the only two extensions one would put versions on but it's all I've ever seen and matchesshared_library
.Probably fixes #7059