From nobody Sun Feb 8 10:43:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594893824; cv=none; d=zohomail.com; s=zohoarc; b=aZ0GUYrl5EF5WQqnoJvkvqJ9vStPx6LmUOG20xguRQYnLuV3TEtaa9XbCqIfYB9B3vBfNvNoEXuWfBSPFe/YTaUFgdslGRN5k4MLqtSIclo8MkHvf0xrWRF6f5i3z1be+XMpoyo7hTETVq5oaelFu4PkDnuAxc0edw9HuHJRzqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594893824; 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=WvcxBj8YXCfdTHyhw/MTVotRRnIKYn3jhMgit44IJSo=; b=Z4SrBja4VVVfYCxVn49mqJImgkD7z2b04+/7oJKw5op26KEBLznA/CMedb0J7cwzYS2gsUbmIMvPSfMvQJ+spfxCKoaG4qLUVIk920Rvoaoh8peKERILOON1tOMn7WC+ngZINOLrEBhWGW3bIGohQNp9SLMGFidNi44EPfsXucw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1594893824278131.0121269224394; Thu, 16 Jul 2020 03:03:44 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-362-Z3irkqrJMeG2AvFqcCtL3Q-1; Thu, 16 Jul 2020 06:03:29 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F22E3100CCD7; Thu, 16 Jul 2020 10:03:20 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CB4A374F64; Thu, 16 Jul 2020 10:03:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9A98096254; Thu, 16 Jul 2020 10:03:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA3Gfo017071 for ; Thu, 16 Jul 2020 06:03:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1CDAD2DE71; Thu, 16 Jul 2020 10:03:16 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C55D2B6E6 for ; Thu, 16 Jul 2020 10:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594893822; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=WvcxBj8YXCfdTHyhw/MTVotRRnIKYn3jhMgit44IJSo=; b=iaY8+NSZk00aRu7H4vtmKnrMtXxnPOuc3nh5lu6bt6De0F3gcYFBMg2EFfACFNU8UYaqqC FCJM3H/A2uJ0z42PcTUlyEO1Yc8gzHoVg1UKfVb9WO30upEOK2ESuyOwR9ON4VI+Oq+hbw u2OCcwcX397Q9yvRxlrQx2opQ2VBYSQ= X-MC-Unique: Z3irkqrJMeG2AvFqcCtL3Q-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 113/351] meson: add debug_logs build option Date: Thu, 16 Jul 2020 11:55:49 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- configure.ac | 3 --- m4/virt-debug.m4 | 33 --------------------------------- meson.build | 5 +++++ meson_options.txt | 1 + 4 files changed, 6 insertions(+), 36 deletions(-) delete mode 100644 m4/virt-debug.m4 diff --git a/configure.ac b/configure.ac index 3a4d98f1dd9..2ecdd30d48f 100644 --- a/configure.ac +++ b/configure.ac @@ -101,7 +101,6 @@ dnl dnl Miscellaneous checks dnl =20 -LIBVIRT_ARG_DEBUG LIBVIRT_ARG_DTRACE LIBVIRT_ARG_NUMAD LIBVIRT_ARG_INIT_SCRIPT @@ -112,7 +111,6 @@ LIBVIRT_ARG_TLS_PRIORITY LIBVIRT_ARG_SYSCTL_CONFIG =20 =20 -LIBVIRT_CHECK_DEBUG LIBVIRT_CHECK_DTRACE LIBVIRT_CHECK_NUMAD LIBVIRT_CHECK_INIT_SCRIPT @@ -197,7 +195,6 @@ LIBVIRT_WIN_RESULT_WINDRES AC_MSG_NOTICE([]) AC_MSG_NOTICE([Miscellaneous]) AC_MSG_NOTICE([]) -LIBVIRT_RESULT_DEBUG LIBVIRT_RESULT_DTRACE LIBVIRT_RESULT_NUMAD LIBVIRT_RESULT_INIT_SCRIPT diff --git a/m4/virt-debug.m4 b/m4/virt-debug.m4 deleted file mode 100644 index d3ac0564f2e..00000000000 --- a/m4/virt-debug.m4 +++ /dev/null @@ -1,33 +0,0 @@ -dnl The debug check -dnl -dnl Copyright (C) 2016 Red Hat, Inc. -dnl -dnl This library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public -dnl License as published by the Free Software Foundation; either -dnl version 2.1 of the License, or (at your option) any later version. -dnl -dnl This library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public -dnl License along with this library. If not, see -dnl . -dnl - -AC_DEFUN([LIBVIRT_ARG_DEBUG], [ - LIBVIRT_ARG_ENABLE([DEBUG], [enable debugging output], [yes]) -]) - -AC_DEFUN([LIBVIRT_CHECK_DEBUG], [ - AM_CONDITIONAL([ENABLE_DEBUG], test x"$enable_debug" =3D x"yes") - if test x"$enable_debug" =3D x"yes"; then - AC_DEFINE([ENABLE_DEBUG], [], [whether debugging is enabled]) - fi -]) - -AC_DEFUN([LIBVIRT_RESULT_DEBUG], [ - LIBVIRT_RESULT([Debug], [$enable_debug]) -]) diff --git a/meson.build b/meson.build index 9d80aec8fd3..1a7cc483595 100644 --- a/meson.build +++ b/meson.build @@ -2059,6 +2059,10 @@ if chrdev_lock_files !=3D '' conf.set_quoted('VIR_CHRDEV_LOCK_FILE_PATH', chrdev_lock_files) endif =20 +if get_option('debug_logs') + conf.set('ENABLE_DEBUG', 1) +endif + =20 # define top include directory =20 @@ -2175,6 +2179,7 @@ test_summary =3D { summary(test_summary, section: 'Test suite', bool_yn: true) =20 misc_summary =3D { + 'Debug': conf.has('ENABLE_DEBUG'), 'Use -Werror': cc_flags.contains('-Werror'), 'Warning Flags': supported_cc_flags, 'Char device locks': chrdev_lock_files, diff --git a/meson_options.txt b/meson_options.txt index 1f32533f0f5..a09dad02875 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -91,3 +91,4 @@ option('storage_zfs', type: 'feature', value: 'auto', des= cription: 'ZFS backend =20 # build feature options option('chrdev_lock_files', type: 'string', value: '', description: 'locat= ion for UUCP style lock files for character devices (leave empty for defaul= t paths on some platforms)') +option('debug_logs', type: 'boolean', value: true, description: 'enable de= bugging output') --=20 2.26.2