From 03f7ddf0bf170c00e6d53bf039b6566113f6c936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 16 Dec 2021 10:58:44 +0100 Subject: meson: stop building out convenience libraries by default The meson default for static_library() are: build_by_default=true, install=false. We never interact with the static libraries, and we only care about them as a stepping-stone towards the installable executables or libraries. Thus let's only build them if they are a dependency of something else we are building. While at it, let's drop install:false, since this appears to be the default. This change would have fixed the issue with lib_import_common failing to build too: we wouldn't attempt to build it. In practice this changes very little, because we generally only declare static libraries where there's something in the default target that will make use of them. But it seems to be a better pattern to set build_by_default to false. --- src/shared/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/shared/meson.build') diff --git a/src/shared/meson.build b/src/shared/meson.build index 562d984fc3..5dc58a863d 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -459,7 +459,8 @@ libshared_static = static_library( shared_sources, include_directories : includes, dependencies : libshared_deps, - c_args : ['-fvisibility=default']) + c_args : ['-fvisibility=default'], + build_by_default : false) libshared = shared_library( libshared_name, -- cgit v1.2.1