summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2019-09-19 05:44:57 +0200
committerAllan McRae <allan@archlinux.org>2019-10-07 06:08:57 +0200
commitc0da1ba13a22f099936f60a0d2a752c9ab739ae0 (patch)
treeac3e5661a679b9a9d5d3845d85829d92fac83631
parentde6249ce221aae4062ea131d4f676f7e3d44af28 (diff)
downloadpacman-c0da1ba13a22f099936f60a0d2a752c9ab739ae0.tar.gz
pacman-c0da1ba13a22f099936f60a0d2a752c9ab739ae0.tar.xz
meson: fix libcommon being publicly exposed as a static link dependency
libcommon isn't even installed, so that means libalpm.a (if installed) is fatally broken as it misses objects. The problem is that meson doesn't handle this case correctly: https://github.com/mesonbuild/meson/issues/3934 https://github.com/mesonbuild/meson/issues/3937 https://github.com/mesonbuild/meson/pull/3939 Work around this by manually extracting libcommon's .o files into the list of objects used to create libalpm. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--meson.build4
1 files changed, 2 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 7be2425c..8a0f43fa 100644
--- a/meson.build
+++ b/meson.build
@@ -317,9 +317,10 @@ libcommon = static_library(
libalpm_a = static_library(
'alpm',
libalpm_sources,
+ # https://github.com/mesonbuild/meson/issues/3937
+ objects : libcommon.extract_all_objects(),
include_directories : includes,
dependencies : [crypto_provider, libarchive, libcurl, gpgme],
- link_with : [libcommon],
install : true)
if get_option('default_library') != 'static'
@@ -336,7 +337,6 @@ install_headers(
'lib/libalpm/alpm.h',
'lib/libalpm/alpm_list.h')
-# TODO: libs.private seem quite wrong here
pkgconfig = import('pkgconfig')
pkgconfig.generate(
libalpm,