Since they will never be used outside of the build directory, they do not need to literally contain the .o files, and references will be sufficient. This covers a major use of object libraries, which is that the static library would potentially take up a lot of space by including another copy of every .o file. Fixes #9292 Fixes #8057 Fixes #2129pull/9294/head
parent
253ff71e6b
commit
0a3a9fa0c3
4 changed files with 32 additions and 10 deletions
@ -0,0 +1,11 @@ |
||||
## More efficient static linking of uninstalled libraries |
||||
|
||||
A somewhat common use case of [[static_library]] is to create uninstalled |
||||
internal convenience libraries which are solely meant to be linked to other |
||||
targets. Some build systems call these "object libraries". Meson's |
||||
implementation does always create a static archive. |
||||
|
||||
This will now check to see if the static linker supports "thin archives" |
||||
(archives which do not contain the actual object code, only references to their |
||||
location on disk) and if so, use them to minimize space usage and speed up |
||||
linking. |
Loading…
Reference in new issue