From nobody Wed Nov 27 00:44:38 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=1703179309; cv=none; d=zohomail.com; s=zohoarc; b=LSF7A1VucJX7yW0n6zdR10vjZ75KVU1WMQbTFRchqgg8xyU+C9kh/UHov+RYbIIdhCevIexukr/HCMO0hbKS40sY7L+s0pZ/IHTwAB9zX58h20QKG+638ZtEKGXH9AzcvO/lveHG6cdygtR4bLCSFyjnCUrLUxtePMFpoUDDI5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703179309; 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=cuDZZGfujoEkwBEeQaDmvaxMxn2etEI2ao+6xKMwJak=; b=aCrsPBoXo5+3sGlx7K/1HkZ8grlsCupvYm3itOEXzZe6+ijcOC8ijUC/Kd+gta7KcbEjpBkgUpAepDWGDfx/REhWfFcShpmnRKvLRwihiE4n/5iKNo4nMBO5FrFVCiOklMjgH9bbiZ3Kfg0QyMlVuJRBg59P4/dpC0WnnouE2CI= 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 1703179309565302.6395241220748; Thu, 21 Dec 2023 09:21:49 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGMin-0007cH-8h; Thu, 21 Dec 2023 12:20:33 -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 1rGMim-0007bu-IV for qemu-devel@nongnu.org; Thu, 21 Dec 2023 12:20:32 -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 1rGMik-0004Y4-Tn for qemu-devel@nongnu.org; Thu, 21 Dec 2023 12:20:32 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-455-XUlRsx2OOtKmpVfs6z6OMA-1; Thu, 21 Dec 2023 12:20:28 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3368c707b03so381060f8f.3 for ; Thu, 21 Dec 2023 09:20:28 -0800 (PST) Received: from [192.168.10.118] ([2001:b07:6468:f312:4783:a68:c1ee:15c5]) by smtp.gmail.com with ESMTPSA id y17-20020adff151000000b0033664ffaf5dsm2484120wro.37.2023.12.21.09.20.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 09:20:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703179230; 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=cuDZZGfujoEkwBEeQaDmvaxMxn2etEI2ao+6xKMwJak=; b=O4d4wputKQu8yM93vqBSMDvLRLrlJEKhmeA6FjtwnHdW2k8s08MOU7jCgoemSklc9C5faE uZ0sxIc3yFvVm4Gg3jpcDkyj6I7rHT8SCbeUG62TJ8745EvdLMqMZnIlCMFBzgEk9ykIgV B5CTyseoP+iHituuTs1e8lGqbEBZx1I= X-MC-Unique: XUlRsx2OOtKmpVfs6z6OMA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703179227; x=1703784027; 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=cuDZZGfujoEkwBEeQaDmvaxMxn2etEI2ao+6xKMwJak=; b=NdA6NmxMjXCmZqjXYDGzPBFb27NDF/nbXFZdPmO7tQVwnuJpr92smeQUUZXWWsaE31 LX03gTq2x826jWIe7bv4dqvzTeZy24EDKDUXG+f3SUJ0NWTA27QWLBdQabe9vXfBWqyl KwL/uac/9lAB/WwdmMegSo8FZIlcIPAj9f2tvr104VjbqxUF+6+iFRyJksPAgvTzgZYt XkGqBuJTmXOaSkdXnsmbTotl6RCDuQbSGDtbQrkFPPjwUoX4cqgyJomnyDDoqk+vc+Ob JW5Qu91lfNlyTEXQ4SHVfGspEk8j7id8jl6LrPBe4YI+ytjKghr+Hb4L/GH6YtIbQ6fE c8EQ== X-Gm-Message-State: AOJu0YyLvw1PvdBoU1WGB/UxeUK5NCYIQkYc4xCabh785HZrtsPXNiAx Dt+1JkI+YV9+FHhF4wJ2yTIacl37UtmWccFyAcf7W5fJ2y/nQAckQTNxUwFWyC6qY02eWuFp+9U 5FpMzG19maBiMfBjbXftOlGu3iKfILL0uotSGGhAYcKwuuhka+RD/VBXaB5RS61GnrCDj6xY/tb NTNL3drAQ= X-Received: by 2002:a5d:4491:0:b0:336:9ec:683 with SMTP id j17-20020a5d4491000000b0033609ec0683mr71259wrq.24.1703179226887; Thu, 21 Dec 2023 09:20:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHx2FLl27pL9WfZsCUrfXND3ftVdOSTZiYNeUNKRi9IvgN+kv3Uhzre0pI19KT3eeU51YyiNA== X-Received: by 2002:a5d:4491:0:b0:336:9ec:683 with SMTP id j17-20020a5d4491000000b0033609ec0683mr71252wrq.24.1703179226469; Thu, 21 Dec 2023 09:20:26 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 14/21] meson: move program checks together Date: Thu, 21 Dec 2023 18:19:51 +0100 Message-ID: <20231221171958.59350-15-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: 1703179311737100006 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 90 ++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/meson.build b/meson.build index b8c64c5ecf7..1a1e006ba13 100644 --- a/meson.build +++ b/meson.build @@ -19,21 +19,8 @@ ss =3D import('sourceset') fs =3D import('fs') =20 targetos =3D host_machine.system() -sh =3D find_program('sh') config_host =3D keyval.load(meson.current_build_dir() / 'config-host.mak') =20 -cc =3D meson.get_compiler('c') -all_languages =3D ['c'] -if targetos =3D=3D 'windows' and add_languages('cpp', required: false, nat= ive: false) - all_languages +=3D ['cpp'] - cxx =3D meson.get_compiler('cpp') -endif -if targetos =3D=3D 'darwin' and \ - add_languages('objc', required: get_option('cocoa'), native: false) - all_languages +=3D ['objc'] - objc =3D meson.get_compiler('objc') -endif - # Temporary directory used for files created while # configure runs. Since it is in the build directory # we can safely blow away any previous version of it @@ -94,8 +81,53 @@ have_block =3D have_system or have_tools # Programs # ############ =20 +sh =3D find_program('sh') python =3D import('python').find_installation() =20 +cc =3D meson.get_compiler('c') +all_languages =3D ['c'] +if targetos =3D=3D 'windows' and add_languages('cpp', required: false, nat= ive: false) + all_languages +=3D ['cpp'] + cxx =3D meson.get_compiler('cpp') +endif +if targetos =3D=3D 'darwin' and \ + add_languages('objc', required: get_option('cocoa'), native: false) + all_languages +=3D ['objc'] + objc =3D meson.get_compiler('objc') +endif + +dtrace =3D not_found +stap =3D not_found +if 'dtrace' in get_option('trace_backends') + dtrace =3D find_program('dtrace', required: true) + stap =3D find_program('stap', required: false) + if stap.found() + # Workaround to avoid dtrace(1) producing a file with 'hidden' symbol + # visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility + # instead. QEMU --enable-modules depends on this because the SystemTap + # semaphores are linked into the main binary and not the module's shar= ed + # object. + add_global_arguments('-DSTAP_SDT_V2', + native: false, language: all_languages) + endif +endif + +if get_option('iasl') =3D=3D '' + iasl =3D find_program('iasl', required: false) +else + iasl =3D find_program(get_option('iasl'), required: true) +endif + +edk2_targets =3D [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_= 64-softmmu' ] +unpack_edk2_blobs =3D false +foreach target : edk2_targets + if target in target_dirs + bzip2 =3D find_program('bzip2', required: get_option('install_blobs')) + unpack_edk2_blobs =3D bzip2.found() + break + endif +endforeach + ####################################### # Variables for host and accelerators # ####################################### @@ -167,38 +199,6 @@ if targetos !=3D 'darwin' modular_tcg =3D ['i386-softmmu', 'x86_64-softmmu'] endif =20 -edk2_targets =3D [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_= 64-softmmu' ] -unpack_edk2_blobs =3D false -foreach target : edk2_targets - if target in target_dirs - bzip2 =3D find_program('bzip2', required: get_option('install_blobs')) - unpack_edk2_blobs =3D bzip2.found() - break - endif -endforeach - -dtrace =3D not_found -stap =3D not_found -if 'dtrace' in get_option('trace_backends') - dtrace =3D find_program('dtrace', required: true) - stap =3D find_program('stap', required: false) - if stap.found() - # Workaround to avoid dtrace(1) producing a file with 'hidden' symbol - # visibility. Define STAP_SDT_V2 to produce 'default' symbol visibility - # instead. QEMU --enable-modules depends on this because the SystemTap - # semaphores are linked into the main binary and not the module's shar= ed - # object. - add_global_arguments('-DSTAP_SDT_V2', - native: false, language: all_languages) - endif -endif - -if get_option('iasl') =3D=3D '' - iasl =3D find_program('iasl', required: false) -else - iasl =3D find_program(get_option('iasl'), required: true) -endif - ################## # Compiler flags # ################## --=20 2.43.0