aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-08-30 11:29:54 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2023-12-31 09:11:28 +0100
commitdc4954943d3adc82c4052aed592f2dc5a14c3fc7 (patch)
tree0d32d75c6625bf9c1171bc5319422e6c188d6bd4 /util
parent53e8868d69c195b6b57ccc6847057043c26df1b6 (diff)
meson: remove CONFIG_POSIX and CONFIG_WIN32 from config_targetos
For consistency with other OSes, use if...endif for rules that are target-independent. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/meson.build44
1 files changed, 23 insertions, 21 deletions
diff --git a/util/meson.build b/util/meson.build
index 98dd7fa534..4e970d2b48 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -3,28 +3,31 @@ util_ss.add(files('thread-context.c'), numa)
if not config_host_data.get('CONFIG_ATOMIC64')
util_ss.add(files('atomic64.c'))
endif
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('aio-posix.c'))
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('fdmon-poll.c'))
-if config_host_data.get('CONFIG_EPOLL_CREATE1')
- util_ss.add(files('fdmon-epoll.c'))
+if targetos != 'windows'
+ util_ss.add(files('aio-posix.c'))
+ util_ss.add(files('fdmon-poll.c'))
+ if config_host_data.get('CONFIG_EPOLL_CREATE1')
+ util_ss.add(files('fdmon-epoll.c'))
+ endif
+ util_ss.add(files('compatfd.c'))
+ util_ss.add(files('event_notifier-posix.c'))
+ util_ss.add(files('mmap-alloc.c'))
+ freebsd_dep = []
+ if targetos == 'freebsd'
+ freebsd_dep = util
+ endif
+ util_ss.add(files('oslib-posix.c'), freebsd_dep)
+ util_ss.add(files('qemu-thread-posix.c'))
+ util_ss.add(files('memfd.c'))
+ util_ss.add(files('drm.c'))
+else
+ util_ss.add(files('aio-win32.c'))
+ util_ss.add(files('event_notifier-win32.c'))
+ util_ss.add(files('oslib-win32.c'))
+ util_ss.add(files('qemu-thread-win32.c'))
+ util_ss.add(winmm, pathcch)
endif
util_ss.add(when: linux_io_uring, if_true: files('fdmon-io_uring.c'))
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('compatfd.c'))
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('event_notifier-posix.c'))
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('mmap-alloc.c'))
-freebsd_dep = []
-if targetos == 'freebsd'
- freebsd_dep = util
-endif
-util_ss.add(when: 'CONFIG_POSIX', if_true: [files('oslib-posix.c'), freebsd_dep])
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('qemu-thread-posix.c'))
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('memfd.c'))
-util_ss.add(when: 'CONFIG_WIN32', if_true: files('aio-win32.c'))
-util_ss.add(when: 'CONFIG_WIN32', if_true: files('event_notifier-win32.c'))
-util_ss.add(when: 'CONFIG_WIN32', if_true: files('oslib-win32.c'))
-util_ss.add(when: 'CONFIG_WIN32', if_true: files('qemu-thread-win32.c'))
-util_ss.add(when: 'CONFIG_WIN32', if_true: winmm)
-util_ss.add(when: 'CONFIG_WIN32', if_true: pathcch)
if glib_has_gslice
util_ss.add(files('qtree.c'))
endif
@@ -56,7 +59,6 @@ util_ss.add(files('reserved-region.c'))
util_ss.add(files('stats64.c'))
util_ss.add(files('systemd.c'))
util_ss.add(files('transactions.c'))
-util_ss.add(when: 'CONFIG_POSIX', if_true: files('drm.c'))
util_ss.add(files('guest-random.c'))
util_ss.add(files('yank.c'))
util_ss.add(files('int128.c'))