diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-09-23 17:20:45 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-10 13:32:22 -0400 |
commit | 0a3a9fa0c3ebf45c94d9009a59cead571cbecf7b (patch) | |
tree | 9c91885f2dc1a908192fb3fe5e2ac03c8510059d /docs | |
parent | 253ff71e6b801786290b6ecb23aea61dcfeebeca (diff) | |
download | meson-0a3a9fa0c3ebf45c94d9009a59cead571cbecf7b.zip meson-0a3a9fa0c3ebf45c94d9009a59cead571cbecf7b.tar.gz meson-0a3a9fa0c3ebf45c94d9009a59cead571cbecf7b.tar.bz2 |
ar linker: generate thin archives for uninstalled static libraries
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 #2129
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/snippets/uninstalled_static_linker.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/markdown/snippets/uninstalled_static_linker.md b/docs/markdown/snippets/uninstalled_static_linker.md new file mode 100644 index 0000000..cd2e4b0 --- /dev/null +++ b/docs/markdown/snippets/uninstalled_static_linker.md @@ -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. |