Skip to content

qemu: stop reconfiguring, and so rebuilding, QEMU on every build - #343

Open
daniel-rossier wants to merge 1 commit into
mainfrom
fix/qemu-no-reconfigure
Open

daniel-rossier wants to merge 1 commit into
mainfrom
fix/qemu-no-reconfigure

Conversation

@daniel-rossier

Copy link
Copy Markdown
Contributor

build.sh qemu recompiled the whole of QEMU on every run. do_configure is nostamp, so ./configure re-ran each time, and QEMU's configure begins with rm -rf build once build/ holds its auto-created-by-configure marker, which it always does after the first run. Every object was discarded before make.

do_configure now records its configure line in build/.ib-configure-args and skips ./configure when the line is unchanged. meson/ninja then rebuild incrementally, and still reconfigure themselves if a patch touches a meson.build. The record lives in build/, so it disappears whenever configure recreates the directory. The target list is emitted in a fixed order, so alternating virt32/virt64 does not change the line once both targets are built.

Same change in so3, infrabase, micofe, edgem1 and pos_sol.

Tested (virt64): the first build.sh qemu configures and builds (1m49s on so3, 1m19s on pos_sol), the second skips configure and finishes in 7s / 3.5s with qemu-system-aarch64 produced. virt32↔virt64 alternation not exercised.

`build.sh qemu` recompiled the whole of QEMU each time, even with nothing
changed. do_configure is nostamp, so it re-ran ./configure on every
invocation, and QEMU's configure starts with `rm -rf build` whenever
build/ carries the auto-created-by-configure marker, which it always does
after the first run. Every object was thrown away and the make that
followed started from an empty build directory.

do_configure now records the configure line it used in
build/.ib-configure-args and skips ./configure when the line is
unchanged. meson/ninja then rebuild incrementally, and still reconfigure
themselves when a patch touches a meson.build. The record lives inside
build/, so it goes away whenever configure recreates the directory.

The target list is now emitted in a fixed order (arm-softmmu before
aarch64-softmmu), so alternating virt32 and virt64 does not change the
line and trigger a needless reconfigure once both targets are built.

A second `build.sh qemu` with no change goes from a full rebuild
(about 1m50s) to a few seconds.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant