From 0a3a9fa0c3ebf45c94d9009a59cead571cbecf7b Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Thu, 23 Sep 2021 17:20:45 -0400 Subject: 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 --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/backend/ninjabackend.py') diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 2e2ff6d..a053be6 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2790,7 +2790,7 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) if target.import_filename: commands += linker.gen_import_library_args(self.get_import_filename(target)) elif isinstance(target, build.StaticLibrary): - commands += linker.get_std_link_args() + commands += linker.get_std_link_args(not target.should_install()) else: raise RuntimeError('Unknown build target type.') return commands -- cgit v1.1