-
Notifications
You must be signed in to change notification settings - Fork 993
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
[BazelDeps][bugfix] Windows and shared libraries #17045
[BazelDeps][bugfix] Windows and shared libraries #17045
Conversation
9b6bafd
to
e1ba1cc
Compare
(["mylibwin2"], True, | ||
[('mylibwin2', True, '{base_folder}/bin/mylibwin2.dll', '{base_folder}/lib/mylibwin2.if.lib')]), | ||
# Win + Mac + shared | ||
(["mylibwin", "mylibmac"], True, [('mylibmac', True, '{base_folder}/bin/mylibmac.dylib', None), |
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.
This test did not make much sense. Removed.
('mylibwin', True, '{base_folder}/bin/mylibwin.dll', | ||
'{base_folder}/lib/mylibwin.lib')]), | ||
# Linux + Mac + static | ||
(["myliblin", "mylibmac"], False, [('mylibmac', False, '{base_folder}/lib/mylibmac.a', None), |
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.
The same reason
dep = MagicMock() | ||
dep.options.get_safe.return_value = is_shared | ||
dep.ref.name = "my_pkg" | ||
found_libs = _get_libs(dep, cpp_info) |
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.
This has not changed but has improved and simplified.
interface_lib_paths[lib_] = formatted_path | ||
else: | ||
lib_paths[lib_] = formatted_path | ||
name, ext = file_name.split('.', maxsplit=1) # ext could be .if.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.
Dont we want name, ext = file_name.rsplit(".", 1)
to get just the very last extension?
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.
Nope, I need the other one. The difference is:
# libs = ["mylib"]
# file_name = "mylib.if.lib"
name, ext = file_name.rsplit(".", 1) # mylib.if
name, ext = file_name.split(".", 1) # mylib -> I want this one
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.
The very last extension at this point is not important. The only important thing is to check if it's a dll
.
Changelog: Bugfix: BazelDeps did not find DLL files as Conan does not model them in the Windows platform.
Docs: omit
Close: #16691