meson: Boost static detection is broken
detect_lib_modules() calls find_libraries_with_abi_tags() and falls back to self.detect_lib_modules_win() and self.detect_lib_modules_nix() only if the first one fails.
find_libraries_with_abi_tag() uses compiler.find_library() and does not respect self.static at all.
Ideally I would expect compiler.find_library() to accept static keyword and just pass it in this call.
Related issue #1709
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 22 (22 by maintainers)
I agree that this seems like the best approach for now. If we could find some way to get the functionality of libfoo.a in a cross-platform way, this would be even better, but I don’t see how to do that yet.
compiler.find_library()does useself.links(), and with linkers that support it, we can tell it to search for static libraries with-l:libfoo.asyntax. However, we always need to search manually because not all linkers support that syntax.