Browse Source

meson: fix static builds creating conflicting targets

Meson has a global option -Ddefault_library which determines whether to
build all generic libraries as static, shared, or both. When creating a
library of the same name twice, once with library() and once with either
shared_library() or static_library(), some values for -Ddefault_library
will result in a fatal configuration error because multiple rules try to
create libXXX.a or libXXX.so

The reason for creating these additional copies of the library is in
order to optionally build some programs as both "prog" and "prog.static"
(and the latter is, of course, static). So depending on the
default_library value may not be desirable.
pull/1657/head
Eli Schwartz 3 months ago
parent
commit
1c68d580d4
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      libfdisk/meson.build
  2. 2
      libmount/meson.build

2
libfdisk/meson.build

@ -57,7 +57,7 @@ lib__fdisk = static_library(
dependencies : build_libfdisk ? [] : disabler())
lib_fdisk_static = static_library(
'fdisk',
'fdisk_static',
link_whole : lib__fdisk,
link_with : [lib_common,
lib_blkid.get_static_lib(),

2
libmount/meson.build

@ -65,7 +65,7 @@ lib__mount = static_library(
dir_libblkid])
lib_mount_static = static_library(
'mount',
'mount_static',
link_whole : lib__mount,
link_with : [lib_common,
lib_blkid.get_static_lib()],

Loading…
Cancel
Save