|
From: | Paolo Bonzini |
Subject: | Re: [PATCH for-8.0 00/30] Meson changes for QEMU 8.0 |
Date: | Sat, 17 Dec 2022 13:54:51 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 |
On 12/16/22 16:35, Daniel P. Berrangé wrote:
So after applying this series, at least on Fedora, I barely needed configure at all, in so muc as the following successfully built AFAICT: $ mkdir build $ cat > build/config-host.mak <<EOF all: GIT=git GIT_SUBMODULES=ui/keycodemapdb tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc GIT_SUBMODULES_ACTION=update CONFIG_POSIX=y CONFIG_LINUX=y SRC_PATH=/home/berrange/src/virt/qemu TARGET_DIRS=x86_64-softmmu CONFIG_PLUGIN=y HAVE_GDB_BIN=/usr/bin/gdb ENGINE=podman ROMS=pc-bios/optionrom MAKE=make PYTHON=/usr/bin/python3 -B GENISOIMAGE=/usr/bin/genisoimage MESON=/usr/bin/meson NINJA=/usr/bin/ninja PKG_CONFIG= CC=cc EXESUF= TCG_TESTS_TARGETS= x86_64-softmmu EOF $ meson build $ ninja -C build
Yep. It wouldn't build the firmwares though, or be able to run TCG or Avocado tests. This kind of build system orchestration is the remaining task of configure (see new docs in patch 28). It's not really possible for it to go away, it's beyond Meson's capabilities and intentions.
I would also like to move Python virtual environment configuration to configure. This would give a lot more flexibility in whether to use network or not, for example, and is in line with submodule handling that is already in configure.
Out of the things in config-host.mak there, a few meson already knows, like CC, SRC_PATH, 50% would be just a meson find_program() command, a couple would need meson args (eg TARGET_DIRS), and some just look redundant, eg CONFIG_LINUX largely duplicates __linux__, and CONFIG_POSIX is effectively !_WIN32.
There are a couple like ENGINE or HAVE_GDB_BIN that are only needed by non-QEMU parts of the build system, and I don't think it makes much sense to move those detections out of configure.
But yeah, the OS symbols are pretty low-hanging fruit. In fact meson.build recomputes them:
config_host_data.set('CONFIG_POSIX', targetos != 'windows')... and with Windriver's patches to get much closer to POSIX/Windows feature parity, the Makefiles don't use them as much as they did.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |