From nobody Tue Feb 10 14:49:17 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1694091729; cv=none; d=zohomail.com; s=zohoarc; b=W2jzeEyMlobf+N8oNquFuOrdWfCtY4rGp805K7dFK2eryQvBKUTDVseX8sSvtpbKR732XDvvk/KkPgTt8E2CrzePlWhfVO8fv11GVJqpbq8+bQSg44VBqVVWa8goSaXbinr0kn7df1OWTeMa8QLS15LynDtdQAvvYQhxPw984Y8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694091729; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HOpLJD4d/iFJqosaXJ0woijBr9D1R6HCS4xj7bDmWbc=; b=COWV0bjNjWqVjHEQczGjWJSGV2wq3kdAC4H7MSrEQfKAeHj1wff6pD41lvJVrU7+gQ1BBudVdWamV42JmweSQZn6u/OsjZvq6jmenCH4BZZQLx7a5Tr7omLBA6PtQbMxManhueIxhs6SFoW4MrlXGALyaFdqJlNXdEUqEtS858g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1694091729642399.64099973319287; Thu, 7 Sep 2023 06:02:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeEdl-00041s-Ii; Thu, 07 Sep 2023 09:01:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdV-0003VF-VK for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeEdS-0007Pu-4c for qemu-devel@nongnu.org; Thu, 07 Sep 2023 09:01:29 -0400 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-20-057s555rOkuN6RyPcnrBFw-1; Thu, 07 Sep 2023 09:01:23 -0400 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-401e1c55ddcso7099135e9.0 for ; Thu, 07 Sep 2023 06:01:21 -0700 (PDT) Received: from [192.168.1.174] ([151.48.237.81]) by smtp.gmail.com with ESMTPSA id n4-20020a05600c294400b003fbdbd0a7desm2473968wmd.27.2023.09.07.06.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:01:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694091685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HOpLJD4d/iFJqosaXJ0woijBr9D1R6HCS4xj7bDmWbc=; b=fmjgi136uXpyynnHobRuOM7DSk69V3qG+tDbEiqi6pdVvikB2dBCv9Xnl1mIEpcv8l6Tfv kqNL87doqwWXStcYNxyFC7x3HHiqDD4WZMi21Qqkbo1v/EKX3yfTpfJz/ceiwFgBAw5L8I vKsn+lEGoO6X6xThAkRnEvJcqs78JFQ= X-MC-Unique: 057s555rOkuN6RyPcnrBFw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694091680; x=1694696480; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HOpLJD4d/iFJqosaXJ0woijBr9D1R6HCS4xj7bDmWbc=; b=lBazux7sFPZdqI/UnSfwzvoElGupSUkF0hzWBSCJyfZ5ApLoSO3CIrzPKVfsh6MyIR OZrcJ/NGXC4hbM5wQNvMckf0eYsCMLv+0onEbSnXh2mreRfI6axiLcA+3bj25sokasWM uhGMQChBaCVgxQFG2xUIbQUE/urUiMv9XrOwhwUXsYOf1rC4MnCekJJL6BLEH7D2BoB/ WMRzSppMazCS9Lii6apfisE3xzsTOWpYG+h/mScRbvw3ryeHgtFlXKnPUYIJza7/PpmL cUW04fQpj0OGedKewPvV16PeJM0nZPkS4eQoBcDLqH3wvdBhLzBWNMVHciXYDyM7aK1O ESIw== X-Gm-Message-State: AOJu0Yx0PAN0p+Hm3vLciMQy8JIBza2OCehDS9Jor8uTaaBaEx0M0OuQ AxlzpuUmVvAGdqgbSIYNZn9um0v1xn035/Xs7HTJeje3MMEWgJLaJbaZkrA3ilfhWKNX2/SFA0U OKmuu4mLVPY2qp12MEa+Tgm0/Jv9HTGLAH+xYJcoTZMTMrXDE1aLW26mH+DpTt3QKNA6+FKE0Z7 s= X-Received: by 2002:a7b:c7c7:0:b0:3fe:1db2:5179 with SMTP id z7-20020a7bc7c7000000b003fe1db25179mr4618110wmk.19.1694091679682; Thu, 07 Sep 2023 06:01:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbxN6fAxCVgunKwKYopNjGtqtppvzLJwway4V15hqIJe/EV9BxMXLgCRaawAtWZc21P6u1gw== X-Received: by 2002:a7b:c7c7:0:b0:3fe:1db2:5179 with SMTP id z7-20020a7bc7c7000000b003fe1db25179mr4618081wmk.19.1694091679063; Thu, 07 Sep 2023 06:01:19 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 31/51] configure, meson: remove target OS symbols from config-host.mak Date: Thu, 7 Sep 2023 14:59:40 +0200 Message-ID: <20230907130004.500601-32-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230907130004.500601-1-pbonzini@redhat.com> References: <20230907130004.500601-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1694091730274100001 Content-Type: text/plain; charset="utf-8" Stop applying config-host.mak to the sourcesets, since it does not have any more CONFIG_* symbols coming from the command line. Signed-off-by: Paolo Bonzini --- Makefile | 2 +- chardev/meson.build | 2 +- configure | 18 ---------------- docs/devel/kconfig.rst | 2 +- gdbstub/meson.build | 4 ++-- meson.build | 43 ++++++++++++++++++++++++++------------ qga/meson.build | 4 ++-- storage-daemon/meson.build | 2 +- tcg/meson.build | 2 +- tests/meson.build | 2 +- tests/qtest/meson.build | 12 +++++------ tests/unit/meson.build | 6 +++--- 12 files changed, 49 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index 118c28e80d9..bfc4b2c8e92 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,7 @@ endif @echo 'Documentation targets:' $(call print-help,html man,Build documentation in specified format) @echo '' -ifdef CONFIG_WIN32 +ifneq ($(filter msi, $(ninja-targets)),) @echo 'Windows targets:' $(call print-help,installer,Build NSIS-based installer for QEMU) $(call print-help,msi,Build MSI-based installer for qemu-ga) diff --git a/chardev/meson.build b/chardev/meson.build index fb630b429eb..6d56ad32fdb 100644 --- a/chardev/meson.build +++ b/chardev/meson.build @@ -26,7 +26,7 @@ chardev_ss.add(when: 'CONFIG_WIN32', if_true: files( 'char-win.c', )) =20 -chardev_ss =3D chardev_ss.apply(config_host, strict: false) +chardev_ss =3D chardev_ss.apply(config_targetos, strict: false) =20 system_ss.add(files( 'char-hmp-cmds.c', diff --git a/configure b/configure index a76bdd78623..ef085376922 100755 --- a/configure +++ b/configure @@ -1683,32 +1683,14 @@ echo >> $config_host_mak echo all: >> $config_host_mak =20 if test "$targetos" =3D "windows"; then - echo "CONFIG_WIN32=3Dy" >> $config_host_mak echo "QEMU_GA_MANUFACTURER=3D${QEMU_GA_MANUFACTURER-QEMU}" >> $config_ho= st_mak echo "QEMU_GA_DISTRO=3D${QEMU_GA_DISTRO-Linux}" >> $config_host_mak echo "QEMU_GA_VERSION=3D${QEMU_GA_VERSION-$(cat "$source_path"/VERSION)}= " >> $config_host_mak -else - echo "CONFIG_POSIX=3Dy" >> $config_host_mak -fi - -if test "$targetos" =3D "linux" ; then - echo "CONFIG_LINUX=3Dy" >> $config_host_mak -fi - -if test "$targetos" =3D "darwin" ; then - echo "CONFIG_DARWIN=3Dy" >> $config_host_mak fi =20 echo "SRC_PATH=3D$source_path" >> $config_host_mak echo "TARGET_DIRS=3D$target_list" >> $config_host_mak =20 -# XXX: suppress that -case $targetos in - gnu/kfreebsd | freebsd | dragonfly | netbsd | openbsd | darwin) - echo "CONFIG_BSD=3Dy" >> $config_host_mak - ;; -esac - if test -n "$gdb_bin"; then gdb_version=3D$($gdb_bin --version | head -n 1) if version_ge ${gdb_version##* } 9.1; then diff --git a/docs/devel/kconfig.rst b/docs/devel/kconfig.rst index e3a544e463f..73f52de1067 100644 --- a/docs/devel/kconfig.rst +++ b/docs/devel/kconfig.rst @@ -316,6 +316,6 @@ variable:: =20 host_kconfig =3D \ (have_tpm ? ['CONFIG_TPM=3Dy'] : []) + \ - ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=3Dy'] : []) + \ + (targetos =3D=3D 'linux' ? ['CONFIG_LINUX=3Dy'] : []) + \ (have_ivshmem ? ['CONFIG_IVSHMEM=3Dy'] : []) + \ ... diff --git a/gdbstub/meson.build b/gdbstub/meson.build index 77762e0b3e1..9500b9dc4e6 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -14,8 +14,8 @@ gdb_system_ss =3D ss.source_set() gdb_user_ss.add(files('gdbstub.c', 'user.c')) gdb_system_ss.add(files('gdbstub.c', 'softmmu.c')) =20 -gdb_user_ss =3D gdb_user_ss.apply(config_host, strict: false) -gdb_system_ss =3D gdb_system_ss.apply(config_host, strict: false) +gdb_user_ss =3D gdb_user_ss.apply(config_targetos, strict: false) +gdb_system_ss =3D gdb_system_ss.apply(config_targetos, strict: false) =20 libgdb_user =3D static_library('gdb_user', gdb_user_ss.sources() + genh, diff --git a/meson.build b/meson.build index a7470b57081..16f0475955d 100644 --- a/meson.build +++ b/meson.build @@ -2069,10 +2069,15 @@ config_host_data.set('CONFIG_MODULE_UPGRADES', get_= option('module_upgrades')) config_host_data.set('CONFIG_ATTR', libattr.found()) config_host_data.set('CONFIG_BDRV_WHITELIST_TOOLS', get_option('block_drv_= whitelist_in_tools')) config_host_data.set('CONFIG_BRLAPI', brlapi.found()) +config_host_data.set('CONFIG_BSD', targetos in bsd_oses) config_host_data.set('CONFIG_COCOA', cocoa.found()) +config_host_data.set('CONFIG_DARWIN', targetos =3D=3D 'darwin') config_host_data.set('CONFIG_FUZZ', get_option('fuzzing')) config_host_data.set('CONFIG_GCOV', get_option('b_coverage')) config_host_data.set('CONFIG_LIBUDEV', libudev.found()) +config_host_data.set('CONFIG_LINUX', targetos =3D=3D 'linux') +config_host_data.set('CONFIG_POSIX', targetos !=3D 'windows') +config_host_data.set('CONFIG_WIN32', targetos =3D=3D 'windows') config_host_data.set('CONFIG_LZO', lzo.found()) config_host_data.set('CONFIG_MPATH', mpathpersist.found()) config_host_data.set('CONFIG_BLKIO', blkio.found()) @@ -2799,6 +2804,18 @@ endif ######################## =20 minikconf =3D find_program('scripts/minikconf.py') +config_targetos =3D { + (targetos =3D=3D 'windows' ? 'CONFIG_WIN32' : 'CONFIG_POSIX'): 'y' +} +if targetos =3D=3D 'darwin' + config_targetos +=3D {'CONFIG_DARWIN': 'y'} +elif targetos =3D=3D 'linux' + config_targetos +=3D {'CONFIG_LINUX': 'y'} +endif +if targetos in bsd_oses + config_targetos +=3D {'CONFIG_BSD': 'y'} +endif + config_all =3D {} config_all_devices =3D {} config_all_disas =3D {} @@ -2842,7 +2859,7 @@ host_kconfig =3D \ (have_vhost_vdpa ? ['CONFIG_VHOST_VDPA=3Dy'] : []) + \ (have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=3Dy'] : []) + \ (have_virtfs ? ['CONFIG_VIRTFS=3Dy'] : []) + \ - ('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=3Dy'] : []) + \ + (targetos =3D=3D 'linux' ? ['CONFIG_LINUX=3Dy'] : []) + \ (have_pvrdma ? ['CONFIG_PVRDMA=3Dy'] : []) + \ (multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=3Dy'] : []) + \ (vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=3Dy'] : []) @@ -2863,7 +2880,7 @@ foreach target : target_dirs endif config_target +=3D { 'CONFIG_LINUX_USER': 'y' } elif target.endswith('bsd-user') - if 'CONFIG_BSD' not in config_host + if targetos not in bsd_oses if default_targets continue endif @@ -2994,7 +3011,7 @@ target_dirs =3D actual_target_dirs # pseudo symbol replaces it. =20 config_all +=3D config_all_devices -config_all +=3D config_host +config_all +=3D config_targetos config_all +=3D config_all_disas config_all +=3D { 'CONFIG_XEN': xen.found(), @@ -3341,7 +3358,7 @@ if enable_modules modulecommon =3D declare_dependency(link_whole: libmodulecommon, compile= _args: '-DBUILD_DSO') endif =20 -qom_ss =3D qom_ss.apply(config_host, strict: false) +qom_ss =3D qom_ss.apply(config_targetos, strict: false) libqom =3D static_library('qom', qom_ss.sources() + genh, dependencies: [qom_ss.dependencies()], name_suffix: 'fa') @@ -3515,7 +3532,7 @@ foreach d, list : target_modules foreach target : target_dirs if target.endswith('-softmmu') config_target =3D config_target_mak[target] - config_target +=3D config_host + config_target +=3D config_targetos target_inc =3D [include_directories('target' / config_target['TA= RGET_BASE_ARCH'])] c_args =3D ['-DNEED_CPU_H', '-DCONFIG_TARGET=3D"@0@-config-target.h"'.format(targe= t), @@ -3576,7 +3593,7 @@ qemu_syms =3D custom_target('qemu.syms', output: 'qem= u.syms', capture: true, command: [undefsym, nm, '@INPUT@']) =20 -authz_ss =3D authz_ss.apply(config_host, strict: false) +authz_ss =3D authz_ss.apply(config_targetos, strict: false) libauthz =3D static_library('authz', authz_ss.sources() + genh, dependencies: [authz_ss.dependencies()], name_suffix: 'fa', @@ -3585,7 +3602,7 @@ libauthz =3D static_library('authz', authz_ss.sources= () + genh, authz =3D declare_dependency(link_whole: libauthz, dependencies: qom) =20 -crypto_ss =3D crypto_ss.apply(config_host, strict: false) +crypto_ss =3D crypto_ss.apply(config_targetos, strict: false) libcrypto =3D static_library('crypto', crypto_ss.sources() + genh, dependencies: [crypto_ss.dependencies()], name_suffix: 'fa', @@ -3594,7 +3611,7 @@ libcrypto =3D static_library('crypto', crypto_ss.sour= ces() + genh, crypto =3D declare_dependency(link_whole: libcrypto, dependencies: [authz, qom]) =20 -io_ss =3D io_ss.apply(config_host, strict: false) +io_ss =3D io_ss.apply(config_targetos, strict: false) libio =3D static_library('io', io_ss.sources() + genh, dependencies: [io_ss.dependencies()], link_with: libqemuutil, @@ -3610,7 +3627,7 @@ migration =3D declare_dependency(link_with: libmigrat= ion, dependencies: [zlib, qom, io]) system_ss.add(migration) =20 -block_ss =3D block_ss.apply(config_host, strict: false) +block_ss =3D block_ss.apply(config_targetos, strict: false) libblock =3D static_library('block', block_ss.sources() + genh, dependencies: block_ss.dependencies(), link_depends: block_syms, @@ -3621,7 +3638,7 @@ block =3D declare_dependency(link_whole: [libblock], link_args: '@block.syms', dependencies: [crypto, io]) =20 -blockdev_ss =3D blockdev_ss.apply(config_host, strict: false) +blockdev_ss =3D blockdev_ss.apply(config_targetos, strict: false) libblockdev =3D static_library('blockdev', blockdev_ss.sources() + genh, dependencies: blockdev_ss.dependencies(), name_suffix: 'fa', @@ -3630,7 +3647,7 @@ libblockdev =3D static_library('blockdev', blockdev_s= s.sources() + genh, blockdev =3D declare_dependency(link_whole: [libblockdev], dependencies: [block, event_loop_base]) =20 -qmp_ss =3D qmp_ss.apply(config_host, strict: false) +qmp_ss =3D qmp_ss.apply(config_targetos, strict: false) libqmp =3D static_library('qmp', qmp_ss.sources() + genh, dependencies: qmp_ss.dependencies(), name_suffix: 'fa', @@ -3645,7 +3662,7 @@ libchardev =3D static_library('chardev', chardev_ss.s= ources() + genh, =20 chardev =3D declare_dependency(link_whole: libchardev) =20 -hwcore_ss =3D hwcore_ss.apply(config_host, strict: false) +hwcore_ss =3D hwcore_ss.apply(config_targetos, strict: false) libhwcore =3D static_library('hwcore', sources: hwcore_ss.sources() + genh, name_suffix: 'fa', build_by_default: false) @@ -3702,7 +3719,7 @@ foreach target : target_dirs '-DCONFIG_DEVICES=3D"@0@-config-devices.h"'.format(target)] link_args =3D emulator_link_args =20 - config_target +=3D config_host + config_target +=3D config_targetos target_inc =3D [include_directories('target' / config_target['TARGET_BAS= E_ARCH'])] if targetos =3D=3D 'linux' target_inc +=3D include_directories('linux-headers', is_system: true) diff --git a/qga/meson.build b/qga/meson.build index dd18092f561..59cae0cc6ee 100644 --- a/qga/meson.build +++ b/qga/meson.build @@ -85,7 +85,7 @@ qga_ss.add(when: 'CONFIG_WIN32', if_true: files( 'vss-win32.c' )) =20 -qga_ss =3D qga_ss.apply(config_host, strict: false) +qga_ss =3D qga_ss.apply(config_targetos, strict: false) =20 gen_tlb =3D [] qga_libs =3D [] @@ -180,7 +180,7 @@ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir= ()) # the leak detector in build-oss-fuzz Gitlab CI test. we should re-enable # this when an alternative is implemented or when the underlying glib # issue is identified/fix -#if 'CONFIG_POSIX' in config_host +#if targetos !=3D 'windows' if false srcs =3D [files('commands-posix-ssh.c')] i =3D 0 diff --git a/storage-daemon/meson.build b/storage-daemon/meson.build index 49c9d2eac91..5e90cd32b40 100644 --- a/storage-daemon/meson.build +++ b/storage-daemon/meson.build @@ -5,7 +5,7 @@ qsd_ss.add(blockdev, chardev, qmp, qom, qemuutil, gnutls) subdir('qapi') =20 if have_tools - qsd_ss =3D qsd_ss.apply(config_host, strict: false) + qsd_ss =3D qsd_ss.apply(config_targetos, strict: false) qsd =3D executable('qemu-storage-daemon', qsd_ss.sources(), dependencies: qsd_ss.dependencies(), diff --git a/tcg/meson.build b/tcg/meson.build index c0252c41988..0014dca7d4f 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -22,7 +22,7 @@ if get_option('tcg_interpreter') tcg_ss.add(files('tci.c')) endif =20 -tcg_ss =3D tcg_ss.apply(config_host, strict: false) +tcg_ss =3D tcg_ss.apply(config_targetos, strict: false) =20 libtcg_user =3D static_library('tcg_user', tcg_ss.sources() + genh, diff --git a/tests/meson.build b/tests/meson.build index c2528a88f99..debaa4505eb 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -68,7 +68,7 @@ test_deps =3D { 'test-qht-par': qht_bench, } =20 -if have_tools and have_vhost_user and 'CONFIG_LINUX' in config_host +if have_tools and have_vhost_user and targetos =3D=3D 'linux' executable('vhost-user-bridge', sources: files('vhost-user-bridge.c'), dependencies: [qemuutil, vhost_user]) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index df63909ee51..383bdfeda96 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -38,8 +38,8 @@ qtests_cxl =3D \ # for the availability of the default NICs in the tests qtests_filter =3D \ (get_option('default_devices') and slirp.found() ? ['test-netfilter'] : = []) + \ - (get_option('default_devices') and config_host.has_key('CONFIG_POSIX') ?= ['test-filter-mirror'] : []) + \ - (get_option('default_devices') and config_host.has_key('CONFIG_POSIX') ?= ['test-filter-redirector'] : []) + (get_option('default_devices') and targetos !=3D 'windows' ? ['test-filt= er-mirror'] : []) + \ + (get_option('default_devices') and targetos !=3D 'windows' ? ['test-filt= er-redirector'] : []) =20 qtests_i386 =3D \ (slirp.found() ? ['pxe-test'] : []) + \ @@ -48,7 +48,7 @@ qtests_i386 =3D \ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) += \ (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] := []) + \ - (config_host.has_key('CONFIG_LINUX') and = \ + (targetos =3D=3D 'linux' and = \ config_all_devices.has_key('CONFIG_ISA_IPMI_BT') and config_all_devices.has_key('CONFIG_IPMI_EXTERN') ? ['ipmi-bt-test'] : [= ]) + \ (config_all_devices.has_key('CONFIG_WDT_IB700') ? ['wdt_ib700-test'] : [= ]) + \ @@ -74,7 +74,7 @@ qtests_i386 =3D \ (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + = \ (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] := []) + \ (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) = + \ - (config_host.has_key('CONFIG_POSIX') and = \ + (targetos !=3D 'windows' and = \ config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + = \ (config_all_devices.has_key('CONFIG_PCIE_PORT') and = \ config_all_devices.has_key('CONFIG_VIRTIO_NET') and = \ @@ -275,7 +275,7 @@ if config_all_devices.has_key('CONFIG_VIRTIO_SERIAL') qos_test_ss.add(files('virtio-serial-test.c')) endif =20 -if config_host.has_key('CONFIG_POSIX') +if targetos !=3D 'windows' qos_test_ss.add(files('e1000e-test.c')) endif if have_virtfs @@ -308,7 +308,7 @@ qtests =3D { 'ivshmem-test': [rt, '../../contrib/ivshmem-server/ivshmem-server.c'], 'migration-test': migration_files, 'pxe-test': files('boot-sector.c'), - 'qos-test': [chardev, io, qos_test_ss.apply(config_host, strict: false).= sources()], + 'qos-test': [chardev, io, qos_test_ss.apply(config_targetos, strict: fal= se).sources()], 'tpm-crb-swtpm-test': [io, tpmemu_files], 'tpm-crb-test': [io, tpmemu_files], 'tpm-tis-swtpm-test': [io, tpmemu_files, 'tpm-tis-util.c'], diff --git a/tests/unit/meson.build b/tests/unit/meson.build index 93977cc32d2..0299ef6906c 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -98,7 +98,7 @@ if have_block } if gnutls.found() and \ tasn1.found() and \ - 'CONFIG_POSIX' in config_host + targetos !=3D 'windows' tests +=3D { 'test-crypto-tlscredsx509': ['crypto-tls-x509-helpers.c', 'pkix_asn1= _tab.c', tasn1, crypto, gnutls], @@ -113,7 +113,7 @@ if have_block if xts =3D=3D 'private' tests +=3D {'test-crypto-xts': [crypto, io]} endif - if 'CONFIG_POSIX' in config_host + if targetos !=3D 'windows' tests +=3D { 'test-image-locking': [testblock], 'test-nested-aio-poll': [testblock], @@ -148,7 +148,7 @@ if have_system # are not runnable under TSan due to a known issue. # https://github.com/google/sanitizers/issues/1116 if not get_option('tsan') - if 'CONFIG_POSIX' in config_host + if targetos !=3D 'windows' tests +=3D { 'test-char': ['socket-helpers.c', qom, io, chardev] } --=20 2.41.0