From nobody Tue Feb 10 07:41:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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=1679417284; cv=none; d=zohomail.com; s=zohoarc; b=GfmlU9zOslRvpTyYRM75GX2ymmHAFkdJqbKzgoBqrmXWr10RasPfPse/mrfkVaus26u6iFZE5pjFty/GV8g9BOiC0KT24nbXnjVZP7PEiJ+dn0HcN2BmglCsAXAjcguc1gP+CxOErR46igTnMrFrVjmHH2aNsLXYBfsngPzHB6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679417284; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=lqjU8c4r39IuvtUxosHj04NRLDT6x1DR1etlRhwErC0=; b=B9F8O08EMBs74HKLKX6uRkDY5cX9uUCNRatmQ+nkszjkiIof8067l1HJT32QvmirYAajlBrp4xRamVIkg0Mba2ZPzNvnRfDFJB2P89ikl7z61HtGj2dCGWj8dQYiHSKK00le0N52HttytFbc9LffBeKrkDzNdT9x04hAjgnbEU4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1679417284318178.8721104691915; Tue, 21 Mar 2023 09:48:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-353-MvXvbxUsMeuhmBMjUkc6dw-1; Tue, 21 Mar 2023 12:47:30 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C80E85C6E1; Tue, 21 Mar 2023 16:47:27 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1DDF492C14; Tue, 21 Mar 2023 16:47:26 +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 6D46A19465B5; Tue, 21 Mar 2023 16:47:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F2CD719465B6 for ; Tue, 21 Mar 2023 16:47:21 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id AC5CA2027063; Tue, 21 Mar 2023 16:47:21 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52C712027061 for ; Tue, 21 Mar 2023 16:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679417283; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=lqjU8c4r39IuvtUxosHj04NRLDT6x1DR1etlRhwErC0=; b=Sk/1YQKbb8a+rSEHUbSYYMqMrgY1hSDvYf34yOW9Y5rxPcbIG8obn6t0uGgQfGEkUIOFZw +TvSAFgUw9mGtvEnQ9OVX/aI6aBbZ+ONZ82bMYU6TgejRsOnmoYBwqkCtn+ZDqCU+ObPWE rYP7ViyConJSr/BJUVaaQLZ1zh+/r/M= X-MC-Unique: MvXvbxUsMeuhmBMjUkc6dw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] meson: Don't build tests when CLang lacks -fsemantic-interposition Date: Tue, 21 Mar 2023 17:47:19 +0100 Message-Id: <0489592ffa7f2dd29019c1a0c272cbe25ad5f53f.1679417186.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1679417284638100001 Content-Type: text/plain; charset="utf-8"; x-default="true" There are some CLang versions that do not support -fsemantic-interposition. If that's the case, the code is optimized so much that our mocking no longer works. Therefore, disable tests and produce a warning. Signed-off-by: Michal Privoznik Reviewed-by: Martin Kletzander --- Technically, this is a v2 of: https://listman.redhat.com/archives/libvir-list/2023-March/238943.html but a different approach is implemented, so I'm sending it anew. meson.build | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index a0682e8d0b..c15003ce02 100644 --- a/meson.build +++ b/meson.build @@ -2035,8 +2035,18 @@ subdir('src') =20 subdir('tools') =20 -build_tests =3D not get_option('tests').disabled() -if build_tests +build_tests =3D [ not get_option('tests').disabled() ] +if build_tests[0] and \ + cc.get_id() =3D=3D 'clang' and \ + not supported_cc_flags.contains('-fsemantic-interposition') \ + and get_option('optimization') !=3D '0' + # If CLang doesn't support -fsemantic-interposition then our + # mocking doesn't work. The best we can do is to not run the + # test suite. + build_tests =3D [ false, '!!! Forcibly disabling tests because CLang la= cks -fsemantic-interposition. Update CLang or disable optimization !!!' ] +endif + +if build_tests[0] subdir('tests') endif =20 --=20 2.39.2