mbox series

[00/12] Enable building plugins on Windows with Clang

Message ID 20241031040426.772604-1-pierrick.bouvier@linaro.org
Headers show
Series Enable building plugins on Windows with Clang | expand

Message

Pierrick Bouvier Oct. 31, 2024, 4:04 a.m. UTC
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