From patchwork Thu Oct 31 04:04:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 839850 Delivered-To: patch@linaro.org Received: by 2002:adf:a38c:0:b0:37d:45d0:187 with SMTP id l12csp79297wrb; Wed, 30 Oct 2024 21:05:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVG09A+C3kf4cFCx4TY8F6PeDPOneh0JCa9XX9OiHp/102RMwKHvRnjOjnAzpa2c1GKu3T/CQ==@linaro.org X-Google-Smtp-Source: AGHT+IH5fe0oQWgY/Jz51JRJVsaRrE/vqrWpCl8QvFPOUCqrQvgGx/bqd6opc9E0/YliBzNpjU09 X-Received: by 2002:a05:6122:65a2:b0:50d:918d:4da1 with SMTP id 71dfb90a1353d-51015003cc6mr16737016e0c.3.1730347544662; Wed, 30 Oct 2024 21:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1730347544; cv=none; d=google.com; s=arc-20240605; b=OVBTa/WP7Z1/IiKA7hDYkntPmcfd4sR73vSzBqUZPZGXdfvruaRqu/6mt/3/DelObY kA3ZWyctykjEFxvqxDVtA26lhtGDrpFG7ca5OcnKz6sRWc8immWh/pOr7Dl5GxOfjwGV FSfvd1OxAC1krBSpCu1PmFfyFTsLoj+r43cgbfDSunBO2Va5hyuIqpD08OZAmnr8FBYn FeIwsKMFvZTqaeDaxnaMRT9Ao3zvQvCEyWvpaTRjSx6/A6iMWLS4pOkRYu4br/VWvjlj Coa0T79Trx76pkiuBvJNT6USvhXji+sAssgNxAU5t9cpzGMpsaOkAmgBanl9dB5odisw Qu0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=LIqRYMniRHSpc4jxRLdABFuGNlRPDwzw9GuJDNkhcRs=; fh=qCkgi8uX0wPVo2PQZm7xsjDtLlhOh+0Zq/b6I6Z+gew=; b=XhmouwdiPuXJLxBGooLYCWwN0rOOU+cr9gZGx4E8uOZqzRYVzX7NU0RQgnSnLopYN9 EtFmownnrMNQGitl2UtHNILE2YIcHthMrMbDM+q1NEzp/SV6aSThno5hQ6pj3YcPqLIi +GnCytEZ+ztBtjJ0TUOqL0KrYIjM78gjYNeuYn2H2Fmnx9W6tdFYJ7GrsvwM2lR8lPM5 rmTilZadBMvJ7bHTixYOcg6VKoQ4Qa5B2D/uGxQfHjlHcd5RTDksnu2ZBONo1Eb25IJj 8inYNNAPULFPimuzrvq6+vWvqd4YzsW8vb0swbCRxd4f0iEssKSW6GO1aM+3dkaN8GpQ o1eg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dv2TOKsb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7b2f3a9d24asi81882585a.524.2024.10.30.21.05.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 30 Oct 2024 21:05:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dv2TOKsb; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6MQh-0003do-QD; Thu, 31 Oct 2024 00:05:04 -0400 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 1t6MQe-0003bT-Uc for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:05:00 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6MQc-0004pL-CM for qemu-devel@nongnu.org; Thu, 31 Oct 2024 00:04:59 -0400 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2e2dc61bc41so372645a91.1 for ; Wed, 30 Oct 2024 21:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1730347496; x=1730952296; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=LIqRYMniRHSpc4jxRLdABFuGNlRPDwzw9GuJDNkhcRs=; b=dv2TOKsbRyLtmnQwN+rCn+xvon0AIKmlrc8M2/U3tSpldd0To9Ez6t1DHaHAgm/U2G 9xPVsyJ/qQ8De8QGyvNkWe0msiud41dvTLzPV25QTQcDCJK+82IsWvltJc0IIqINVwnw NWmOLIK0kKL3cbWrezDXvPRhoFCAVLClBdlksX/Rl42WIEqD0g4vedemOZfTm4njtoCu KAsErnuu6uDB8BD6Ar7pDO6YnCrc0OprdtrzjSx0XifDmSFT/o1lT3ANQyEpV7g3zTJH ZFQiP0C74a9iAyyv1kmZbhuGkTlUxD1Y7SqE2v9a10z1kJDGC0HStvTFp8tW+zP/f1Pg 8e8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730347497; x=1730952297; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LIqRYMniRHSpc4jxRLdABFuGNlRPDwzw9GuJDNkhcRs=; b=Bj1/JCedOFZRP+i4aWnvc4dFWYxRq9ztjQoIV5QnQHIa/uKGc1aBW57gNdEu/LzBqz wjzXiNwNED6LmtQUF4XtvQsi1pLqqIMM++FxITY/E4lo65JV2YKvkKEOX/iCnXLhmQwg FRQyOMxJSBVAgYqcNJ+47ILZdYFLwLVuwX0gQuBW9XnmDqpof2mR6i/oWTAfBsyfO8y9 abhruDtBc0vMSuuRxNW6dD9teaWGttrzd7LO/IuYcdL9HBhyaCfLvGTzq0STXwxqBJKF 5Er8JAe0iSBnPCPbTwFyWwIAr5WjA1I7h+G/JDL6I/DBUQOJpGbnoCaqp/+v/OhtX2v7 iASg== X-Gm-Message-State: AOJu0YyDR7IUMcT3sCzY4iE/xNCttylLLcFNVnem+G5X9SRO1swIWtmt PA7uzQcSAUnYZZ+Qn42eWSgSTBoJfkvg2zqV6thkGZFl9wnWkzlBu2J0zJGjEm7hbWwhguU8tGk FNg8OAQ== X-Received: by 2002:a17:90b:3e84:b0:2e2:b719:d581 with SMTP id 98e67ed59e1d1-2e8f0f53db8mr20061860a91.5.1730347496436; Wed, 30 Oct 2024 21:04:56 -0700 (PDT) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2e93db3a023sm428438a91.49.2024.10.30.21.04.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 21:04:56 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Cleber Rosa , John Snow , Michael Roth , Alexandre Iooss , Konstantin Kostiuk , Stefano Garzarella , Thomas Huth , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , "Michael S. Tsirkin" , Mahmoud Mandour , Pierrick Bouvier Subject: [PATCH 00/12] Enable building plugins on Windows with Clang Date: Wed, 30 Oct 2024 21:04:14 -0700 Message-Id: <20241031040426.772604-1-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pj1-x102a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org For now, it was only possible to build plugins using GCC on Windows. However, windows-aarch64 only supports Clang. The first patches (already posted and normally pulled) are fixes and prerequisite to build plugins with meson. They are integrated here because it's not possible to have two based-on in the cover letter. Then, we fix compilation warnings on Windows. After that, we can enable linking with Clang on Windows. Finally, we enhanced the plugin symbols export list (automatically generated, and not a static file), and we report some of the information we discovered on the path in the documentation. Built and tested on Windows (all msys env)/Linux/MacOS for x86_64 and aarch64 hosts. Pierrick Bouvier (12): scripts: remove erroneous file that breaks git clone on Windows contrib/plugins/cflow: fix warning meson: build contrib/plugins with meson contrib/plugins: remove Makefile for contrib/plugins qga: fix -Wsometimes-uninitialized windows warning qga: fix missing static and prototypes windows warnings win32: use compiler option instead of attribute gcc_struct plugins: enable linking with clang/lld plugins: add missing export for qemu_plugin_num_vcpus plugins: detect qemu plugin API symbols from header plugins: eradicate qemu-plugins.symbols static file docs: add information on how to setup build environments MAINTAINERS | 1 + docs/about/build-platforms.rst | 4 +- docs/devel/build-system.rst | 100 ++++++++++++++++++++++ configure | 18 ---- Makefile | 10 --- meson.build | 14 ++- include/qemu/compiler.h | 7 +- include/qemu/qemu-plugin.h | 1 + subprojects/libvhost-user/libvhost-user.h | 6 +- contrib/plugins/cflow.c | 6 +- qga/commands-windows-ssh.c | 2 +- contrib/plugins/Makefile | 87 ------------------- contrib/plugins/meson.build | 28 ++++++ plugins/meson.build | 36 ++++++-- plugins/qemu-plugins.symbols | 59 ------------- qga/vss-win32/install.cpp | 6 +- qga/vss-win32/provider.cpp | 5 +- qga/vss-win32/requester.cpp | 8 +- scripts/meson-buildoptions. | 0 scripts/qemu-plugin-symbols.py | 45 ++++++++++ tests/tcg/plugins/meson.build | 3 +- 21 files changed, 238 insertions(+), 208 deletions(-) delete mode 100644 contrib/plugins/Makefile create mode 100644 contrib/plugins/meson.build delete mode 100644 plugins/qemu-plugins.symbols delete mode 100644 scripts/meson-buildoptions. create mode 100755 scripts/qemu-plugin-symbols.py