From nobody Mon Sep 16 18:58:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 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=1693822428; cv=none; d=zohomail.com; s=zohoarc; b=k0nWzeugzl3msBou8LxQI+YRr+qDrLHtjQ9e2282DjtRz4KCeKMYOd0E7IITNAi2cptV/jSAJCTYKESoF3Kx1tpPT6+PIn9UpAmZfvnGKSqrdLk/KbVoKiXKiqQvtWTez9jBvu1oFiQVWNC3a8FXRAyH1xLWA0lE0vQxL+Ddtdc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1693822428; 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=k09kA5nLZzMsw1obHJwrYzDUdqowbXjwbpu8IFqxOac=; b=aPObH7Gk0uP3PXKbAjtx/B7sL/QmX4Yx/oxxKBoQyi/Os/k70ryJUtm+nIycKmQjgGVpKoMrk5uQijUUBKCsxlA6NTa8kBncs/aSwMqQ2MSs3g6NBjOWiX4mVCIhmA8YZodg8L4ON6YFHqCsCeLXomhYcXTgW6GMBrBhHeoOCTk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1693822428527991.9773017345794; Mon, 4 Sep 2023 03:13:48 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-630-93xYquzoMTewLlo3-8UxPA-1; Mon, 04 Sep 2023 06:13:45 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 95E0F38035A7; Mon, 4 Sep 2023 10:13:42 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2378F140E96B; Mon, 4 Sep 2023 10:13:42 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A50FE194729B; Mon, 4 Sep 2023 10:13:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E040E1946595 for ; Mon, 4 Sep 2023 10:13:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C37564043CCD; Mon, 4 Sep 2023 10:13:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 47FC940C206F for ; Mon, 4 Sep 2023 10:13:39 +0000 (UTC) X-MC-Unique: 93xYquzoMTewLlo3-8UxPA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] docs: compiling: Add a note about use of CFLAGS for optimization Date: Mon, 4 Sep 2023 12:13:36 +0200 Message-ID: <40b9fbbe6045a05159c74302a07b25ab01e8c1e6.1693822354.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1693822429016100001 Content-Type: text/plain; charset="utf-8" Meson doesn't interpret what's set in CFLAGS, but rather simply appeds it to the command line. Thus any logic which is based on the optimization level will not work. Note the caveat in the docs and instruct users to use ``--optimization=3DN`` instead. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrang=C3=A9 --- docs/compiling.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/compiling.rst b/docs/compiling.rst index 800264d2f9..0a47a50569 100644 --- a/docs/compiling.rst +++ b/docs/compiling.rst @@ -112,6 +112,11 @@ Please ensure that you have the appropriate minimal ``= meson`` version installed in your build environment. The minimal version for a specific package can = be checked in the top level ``meson.build`` file in the ``meson_version`` fie= ld. +**DO NOT** use the ``CFLAGS`` environment variable to set optimizations +(e.g. ``CFLAGS=3D-O0``), but rather use Meson's ``--optimization=3D0`` opt= ion. +Certain internal build options are based on the configured optimization va= lue +and Meson does not interpret ``CFLAGS``. + Compiling the sources --------------------- --=20 2.41.0