qemu: stop reconfiguring, and so rebuilding, QEMU on every build - #343
Open
daniel-rossier wants to merge 1 commit into
Open
daniel-rossier wants to merge 1 commit into
daniel-rossier wants to merge 1 commit into
Conversation
`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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
build.sh qemurecompiled the whole of QEMU on every run.do_configureis nostamp, so./configurere-ran each time, and QEMU's configure begins withrm -rf buildoncebuild/holds itsauto-created-by-configuremarker, which it always does after the first run. Every object was discarded beforemake.do_configurenow records its configure line inbuild/.ib-configure-argsand skips./configurewhen the line is unchanged. meson/ninja then rebuild incrementally, and still reconfigure themselves if a patch touches ameson.build. The record lives inbuild/, 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 qemuconfigures and builds (1m49s on so3, 1m19s on pos_sol), the second skips configure and finishes in 7s / 3.5s withqemu-system-aarch64produced. virt32↔virt64 alternation not exercised.