From patchwork Wed Jul 10 16:14:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1130499 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KVjCcXOm"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45kPT52kVqz9s3l for ; Thu, 11 Jul 2019 02:16:40 +1000 (AEST) Received: from localhost ([::1]:35216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlFGo-00069l-R5 for incoming@patchwork.ozlabs.org; Wed, 10 Jul 2019 12:16:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55336) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hlFEt-00067H-SU for qemu-devel@nongnu.org; Wed, 10 Jul 2019 12:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hlFEo-0007Qh-H9 for qemu-devel@nongnu.org; Wed, 10 Jul 2019 12:14:37 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:40430) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hlFEo-0007Ny-9A for qemu-devel@nongnu.org; Wed, 10 Jul 2019 12:14:34 -0400 Received: by mail-wr1-x42f.google.com with SMTP id r1so3087414wrl.7 for ; Wed, 10 Jul 2019 09:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=RnLzTrJA1Mc+QEzQAXuyz6OUoUiesbXhUCgxZxgeYVI=; b=KVjCcXOmxGhWjF7T1zNqWztRRF5H/HqRGJADSCimKHZlDzLHVsFO7LaChF/roWl2Kb oDNpCbg4OobMMQr0UYj2eOds1xNUcr3ogzXiw7gG9lcIeTFG7B72W0L5y/sqmY/yuG5S PY6HiyeumV0HMUQow2C0uz6vezOzRqB9nq5LXxCfmgvCaO4qBlA7OUeCkSCSoLo4HvgH pa9thmHVBQa2jm4co2oyhFMTbn5p8Aku3u8KVFPZJzm2G2P/wyAPpKzh06M7JMT8NYYu HUHPiUJBxpV6D4yRiN8CbTfDBkzKVyPRApL7DUSJoz/YHbkYpOaYB9uaBCFAcXum69Sk SKgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=RnLzTrJA1Mc+QEzQAXuyz6OUoUiesbXhUCgxZxgeYVI=; b=lJRTYcZh2R8BikjZZ2C0OKEvb96ua+XJLijCO1EbocBu4B/eYOUZsULzcteH76wzQn t6lLHfHqx539nUMMySXjmrXtSn0ELENDp1aHIGMdkXEtnz8AAI8f1c2iXwVJ8ohotb/c NjCDq6cInmvuirK4RPNFDaWDNukfStNhiatG4xLHBqqDZtlfiPth9Gge1jh1Sd6fS1fX IpGgFYty3wOLdsDNvyEgYy43RN8AFFAfe+Hgv+HWtbQ6xAhCZuXQaR0txHV42FJ49Whz IfGgg1yaS6qFJmBS/g6xRsb04ICtiEA6qULer2vVvp1bx6Llgdu1UvzWVqsY6xnlP19j ymFw== X-Gm-Message-State: APjAAAWWQ+gx5SOg99vu/m+qUbhEmmADyyOmZoSLvu5wpe9WG6hgxe95 OycHFcbrMYOJtssfJDr9SCXFNIZD8Zc= X-Google-Smtp-Source: APXvYqy1ken9rUoCFuX8uzl94SjvkPWsT+/oXNRzk6RoaWjzrZZ89xtxrwt8xSZ7uE8oP/yleP9ahA== X-Received: by 2002:adf:f84f:: with SMTP id d15mr31821452wrq.53.1562775270503; Wed, 10 Jul 2019 09:14:30 -0700 (PDT) Received: from 640k.localdomain ([93.56.166.5]) by smtp.gmail.com with ESMTPSA id w14sm2573747wrk.44.2019.07.10.09.14.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Jul 2019 09:14:28 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 10 Jul 2019 18:14:19 +0200 Message-Id: <1562775267-1222-1-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f Subject: [Qemu-devel] [RFC PATCH v2 0/8] Proof of concept for Meson integration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , berrange@redhat.com, armbru@redhat.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The main change from v1 is that libqemuutil.a, and with it the tracetool and QAPI generated code, is now generated with meson. This shows how to do some "computations" in meson.build using its array and dictionary data structures. It is also a basic usage of the sourceset module for conditional compilation. Overall the look of the meson.build code is quite good, but I must mention the two snags I encountered: - one is just aboud debuggability. Quoting rules on Windows are crazy so you really do not want to go through quoting there; with Make the choice is basically to not support spaces in filenames, Ninja instead chose to only do shell expansion on POSIX systems. For the sake of cross-platformness, Meson uses an external script to do "x > y" on both POSIX and Windows, and that currently is not very debuggable when you use "make V=1". I know how to fix this and, even though the first attempt was rejected at https://github.com/mesonbuild/meson/pull/5573, but I have other arrows in my quiver. Worst case we could pass the output file to tracetool as a command line argument, but I'd rather not do that as it is not a QEMU-specific issue and my philosophy so far has been to improve Meson whenever possible---at least this endeavour would provide benefit to the community even if QEMU rejects it. - the second is more fundamental: with Make we're enjoying much freedom in choosing the include path, in particular the tracing headers are using $(build_root)/$(