qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/4] hw/core: Declare meson source set


From: wangyanan (Y)
Subject: Re: [PATCH 2/4] hw/core: Declare meson source set
Date: Fri, 29 Oct 2021 20:51:21 +0800
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0


On 2021/10/28 23:05, Philippe Mathieu-Daudé wrote:
As we want to be able to conditionally add files to the hw/core
file list, use a source set.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
  meson.build         | 4 +++-
  hw/core/meson.build | 4 ++--
  2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 2c5b53cbe2e..2eb76c187c3 100644
--- a/meson.build
+++ b/meson.build
@@ -2365,6 +2365,7 @@
  chardev_ss = ss.source_set()
  common_ss = ss.source_set()
  crypto_ss = ss.source_set()
+hwcore_ss = ss.source_set()
  io_ss = ss.source_set()
  linux_user_ss = ss.source_set()
  qmp_ss = ss.source_set()
@@ -2805,7 +2806,8 @@
chardev = declare_dependency(link_whole: libchardev) -libhwcore = static_library('hwcore', sources: hwcore_files + genh,
+hwcore_ss = hwcore_ss.apply(config_host, strict: false)
+libhwcore = static_library('hwcore', sources: hwcore_ss.sources() + genh,
                             name_suffix: 'fa',
                             build_by_default: false)
  hwcore = declare_dependency(link_whole: libhwcore)
diff --git a/hw/core/meson.build b/hw/core/meson.build
index a829cc4245b..4d04069f85f 100644
--- a/hw/core/meson.build
+++ b/hw/core/meson.build
@@ -1,5 +1,5 @@
  # core qdev-related obj files, also used by *-user and unit tests
-hwcore_files = files(
+hwcore_ss.add(files(
    'bus.c',
    'hotplug.c',
    'qdev-properties.c',
@@ -11,7 +11,7 @@
    'irq.c',
    'clock.c',
    'qdev-clock.c',
-)
+))
common_ss.add(files('cpu-common.c'))
  softmmu_ss.add(when: 'CONFIG_FITLOADER', if_true: files('loader-fit.c'))
Reviewed-by: Yanan Wang <wangyanan55@huawei.com>
Tested-by: Yanan Wang <wangyanan55@huawei.com>

Thanks,
Yanan



reply via email to

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