From nobody Wed Nov 27 00:26:20 2024 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=1703179431; cv=none; d=zohomail.com; s=zohoarc; b=fUqS9311l/VvC/9KUAklqsUdVxgmbNtHLh0r0L/M5EGryi3ZEecUTjlwk8H7Jnp6A4IeyW9ztfddHZ5JSIILhnHMQkU6zJ3Tm9RS5rqNoi+m9++jnsFhSC18JPEwDihexQZbFiWkdY93/oqpbLkeV01laxhLf5n3MleStbhGzIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703179431; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=sD8zQ2qb3Nom9XRhoC85XFShfiOQE1gFLBrQwUhPrTc=; b=Uu+4hPYpKBGVJSXiAvUtIcAtzoUQ7SOhjwIf/FzyOnYNf155Fqf91npV9bHmupYPN7V+PvvQS0nS7czlO280w2FfbRWNEVfE4PN9OCWf/gcKY1fRejcrmIxRPD2gTEwx7tmZQOFQfwPNYwo/FvZyCy4cbehLSATnc2aIJG8dE4o= 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 1703179431328149.74835813797017; Thu, 21 Dec 2023 09:23:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGMit-0007dZ-AL; Thu, 21 Dec 2023 12:20:39 -0500 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 1rGMir-0007d7-0N for qemu-devel@nongnu.org; Thu, 21 Dec 2023 12:20:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGMip-0004Yr-Ap for qemu-devel@nongnu.org; Thu, 21 Dec 2023 12:20:36 -0500 Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-241-MLLCW4BGNt2Z9rfWW3WFag-1; Thu, 21 Dec 2023 12:20:32 -0500 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3368abe10c5so474720f8f.0 for ; Thu, 21 Dec 2023 09:20:32 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:4783:a68:c1ee:15c5]) by smtp.gmail.com with ESMTPSA id w11-20020adfcd0b000000b003367e35abd4sm2463078wrm.71.2023.12.21.09.20.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 09:20:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703179234; 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=sD8zQ2qb3Nom9XRhoC85XFShfiOQE1gFLBrQwUhPrTc=; b=deOFytHk+VR+CF1epwZTuSxVEfllgufWtUoTyBuLvooQcQarpxTrzjrwz3J5keOfMvzrxf /vyHLvxUPBva0+x4yRfRKJkBX5+tgX4hs3cQ21RAfT2LeYYTlJ4/45E/64kijIu9Q2NAyX ikroUGSizl25Z11+9nbPVqo6zelcg9Q= X-MC-Unique: MLLCW4BGNt2Z9rfWW3WFag-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703179231; x=1703784031; 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=sD8zQ2qb3Nom9XRhoC85XFShfiOQE1gFLBrQwUhPrTc=; b=QYa6//vyGvhrmSDQOD+XhVSVxDmMzYyJdEXTXt+bBbvQy2BCKCJRH4HO6GJEoIsHzb TX4z9hzU/JKYBnEdyPtcOd6r0YaU+jYwmtW2A3U3Fq6GHfipUpmJJ9XBTbcgvZGjR2Vn rEAFHlXTSFA3qsTfHLDMy7SXzsiFyPWTqJiOTaWBMDeRKG0FeJpjeo1TadxJseKPYY1k dLl9i51voZim0I7snsu+6EjH9kX0UdKreot+8ro6JypGBEzVgmhmIMaWdPC+cfq9zY6W YDHN+IF4bsmtSaL+RC1FOTgI3mVTFjqzfZIqlKIEj/vsJ4yPYnB1VoGBomgc53j284lZ x3mw== X-Gm-Message-State: AOJu0YydnShmvPVXDakoiCsqVC2QmE6CyBgA6Qij4+eQpI6JDKEOceA8 f1BDfsGqQe9z08wrdkKXpCo2lKNSVLAuUrxg9eIYxk9esKHEeikqHnOzCbjVx02Xk8D14uN8VPy CXx2l/CnW6pMLgg9KV8y1qNcEMz37iuXcvh/sDoYF0jtcVj2KDKabzi/4zE15p7VWWUXry+eKY+ z1yPlQT6k= X-Received: by 2002:a5d:5089:0:b0:336:6e12:7c5f with SMTP id a9-20020a5d5089000000b003366e127c5fmr56559wrt.2.1703179230887; Thu, 21 Dec 2023 09:20:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwaQTjWh2xejvEFLV8qW4v3JJem4Pa5RUPQ/sN3+qn05rPuSiPC8rYUeGw4fOvBWV9a4P+zA== X-Received: by 2002:a5d:5089:0:b0:336:6e12:7c5f with SMTP id a9-20020a5d5089000000b003366e127c5fmr56555wrt.2.1703179230518; Thu, 21 Dec 2023 09:20:30 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 16/21] meson: separate host-specific checks from option validation Date: Thu, 21 Dec 2023 18:19:53 +0100 Message-ID: <20231221171958.59350-17-pbonzini@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221171958.59350-1-pbonzini@redhat.com> References: <20231221171958.59350-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.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.061, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 1703179432335100006 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 97 +++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/meson.build b/meson.build index f7e7deeabdc..e777f507ce3 100644 --- a/meson.build +++ b/meson.build @@ -602,53 +602,6 @@ have_vhost_net_vdpa =3D have_vhost_vdpa and get_option= ('vhost_net').allowed() have_vhost_net_kernel =3D have_vhost_kernel and get_option('vhost_net').al= lowed() have_vhost_net =3D have_vhost_net_kernel or have_vhost_net_user or have_vh= ost_net_vdpa =20 -# Target-specific libraries and flags -libm =3D cc.find_library('m', required: false) -threads =3D dependency('threads') -util =3D cc.find_library('util', required: false) -winmm =3D [] -socket =3D [] -version_res =3D [] -coref =3D [] -iokit =3D [] -emulator_link_args =3D [] -nvmm =3Dnot_found -hvf =3D not_found -midl =3D not_found -widl =3D not_found -pathcch =3D not_found -host_dsosuf =3D '.so' -if targetos =3D=3D 'windows' - midl =3D find_program('midl', required: false) - widl =3D find_program('widl', required: false) - pathcch =3D cc.find_library('pathcch') - socket =3D cc.find_library('ws2_32') - winmm =3D cc.find_library('winmm') - - win =3D import('windows') - version_res =3D win.compile_resources('version.rc', - depend_files: files('pc-bios/qemu-ns= is.ico'), - include_directories: include_directo= ries('.')) - host_dsosuf =3D '.dll' -elif targetos =3D=3D 'darwin' - coref =3D dependency('appleframeworks', modules: 'CoreFoundation') - iokit =3D dependency('appleframeworks', modules: 'IOKit', required: fals= e) - host_dsosuf =3D '.dylib' -elif targetos =3D=3D 'sunos' - socket =3D [cc.find_library('socket'), - cc.find_library('nsl'), - cc.find_library('resolv')] -elif targetos =3D=3D 'haiku' - socket =3D [cc.find_library('posix_error_mapper'), - cc.find_library('network'), - cc.find_library('bsd')] -elif targetos =3D=3D 'openbsd' - if get_option('tcg').allowed() and target_dirs.length() > 0 - # Disable OpenBSD W^X if available - emulator_link_args =3D cc.get_supported_link_arguments('-Wl,-z,wxneede= d') - endif -endif - # Target-specific configuration of accelerators accelerators =3D [] if get_option('kvm').allowed() and targetos =3D=3D 'linux' @@ -716,6 +669,56 @@ if 'CONFIG_WHPX' not in accelerators and get_option('w= hpx').enabled() error('WHPX not available on this platform') endif =20 +##################################### +# Host-specific libraries and flags # +##################################### + +libm =3D cc.find_library('m', required: false) +threads =3D dependency('threads') +util =3D cc.find_library('util', required: false) +winmm =3D [] +socket =3D [] +version_res =3D [] +coref =3D [] +iokit =3D [] +emulator_link_args =3D [] +nvmm =3Dnot_found +hvf =3D not_found +midl =3D not_found +widl =3D not_found +pathcch =3D not_found +host_dsosuf =3D '.so' +if targetos =3D=3D 'windows' + midl =3D find_program('midl', required: false) + widl =3D find_program('widl', required: false) + pathcch =3D cc.find_library('pathcch') + socket =3D cc.find_library('ws2_32') + winmm =3D cc.find_library('winmm') + + win =3D import('windows') + version_res =3D win.compile_resources('version.rc', + depend_files: files('pc-bios/qemu-ns= is.ico'), + include_directories: include_directo= ries('.')) + host_dsosuf =3D '.dll' +elif targetos =3D=3D 'darwin' + coref =3D dependency('appleframeworks', modules: 'CoreFoundation') + iokit =3D dependency('appleframeworks', modules: 'IOKit', required: fals= e) + host_dsosuf =3D '.dylib' +elif targetos =3D=3D 'sunos' + socket =3D [cc.find_library('socket'), + cc.find_library('nsl'), + cc.find_library('resolv')] +elif targetos =3D=3D 'haiku' + socket =3D [cc.find_library('posix_error_mapper'), + cc.find_library('network'), + cc.find_library('bsd')] +elif targetos =3D=3D 'openbsd' + if get_option('tcg').allowed() and target_dirs.length() > 0 + # Disable OpenBSD W^X if available + emulator_link_args =3D cc.get_supported_link_arguments('-Wl,-z,wxneede= d') + endif +endif + ################ # Dependencies # ################ --=20 2.43.0