qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 2/4] meson: Fixes jemalloc and tcmalloc can not building.


From: Paolo Bonzini
Subject: Re: [PATCH v3 2/4] meson: Fixes jemalloc and tcmalloc can not building.
Date: Mon, 7 Sep 2020 22:00:19 +0200

Hi, LIBS is going away soon. I have a few more Meson patches including one for tcmalloc and jemalloc, I won't post them super soon though.

Paolo

Il lun 7 set 2020, 21:50 Yonggang Luo <luoyonggang@gmail.com> ha scritto:
Currently, the LIBS are not exposed to meson and meson didn't use that
Use base_lib = declare_dependency(link_args: config_host['LIBS'].split())
to force use it


Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 configure   | 9 +++++++++
 meson.build | 5 ++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 823756f4a4..7b2f3d64b0 100755
--- a/configure
+++ b/configure
@@ -7245,6 +7245,14 @@ if test "$libxml2" = "yes" ; then
   echo "LIBXML2_LIBS=$libxml2_libs" >> $config_host_mak
 fi

+if test "$tcmalloc" = "yes" ; then
+  echo "CONFIG_TCMALLOC=y" >> $config_host_mak
+fi
+
+if test "$jemalloc" = "yes" ; then
+  echo "CONFIG_JEMALLOC=y" >> $config_host_mak
+fi
+
 if test "$replication" = "yes" ; then
   echo "CONFIG_REPLICATION=y" >> $config_host_mak
 fi
@@ -7416,6 +7424,7 @@ echo "PKG_CONFIG=$pkg_config_exe" >> $config_host_mak
 echo "WINDRES=$windres" >> $config_host_mak
 echo "CFLAGS=$CFLAGS" >> $config_host_mak
 echo "CFLAGS_NOPIE=$CFLAGS_NOPIE" >> $config_host_mak
+echo "LIBS=$LIBS" >> $config_host_mak
 echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
 echo "QEMU_CXXFLAGS=$QEMU_CXXFLAGS" >> $config_host_mak
 echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 5421eca66a..6e909213ee 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,9 @@ endif
 # grandfathered in from the QEMU Makefiles.
 add_project_arguments(config_host['GLIB_CFLAGS'].split(),
                       native: false, language: ['c', 'cpp', 'objc'])
+
+base_lib = declare_dependency(link_args: config_host['LIBS'].split())
+
 glib = declare_dependency(link_args: config_host['GLIB_LIBS'].split())
 gio = not_found
 if 'CONFIG_GIO' in config_host
@@ -818,7 +821,7 @@ util_ss.add_all(trace_ss)
 util_ss = util_ss.apply(config_all, strict: false)
 libqemuutil = static_library('qemuutil',
                              sources: util_ss.sources() + stub_ss.sources() + genh,
-                             dependencies: [util_ss.dependencies(), m, glib, socket])
+                             dependencies: [util_ss.dependencies(), m, base_lib, glib, socket])
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)

--
2.28.0.windows.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]