diff options
author | Roland Hieber <rhi@pengutronix.de> | 2020-05-25 22:22:10 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-05-29 22:16:20 +0200 |
commit | 943ca0008b5add0d921153fb9ba365fcc33a8318 (patch) | |
tree | 3c6a76cdfae73ebcd751c5b8a01f623c02aee273 /bin | |
parent | d397238e966fe54cc2e9ad2234474e41ae863c1c (diff) | |
download | ptxdist-943ca0008b5add0d921153fb9ba365fcc33a8318.tar.gz ptxdist-943ca0008b5add0d921153fb9ba365fcc33a8318.tar.xz |
ptxd_lib_dgen: optimize ordering only when dependencies are needed
There are use cases where -j is useful to have on the command line to
speed up runs with large amount of packages, but when the install stages
are not needed at all. For example:
ptxdist -j license-check
ptxdist -j make license-report
ptxdist -j extract <long list of package names>
Commit 2e695987211c2c2e6e19 ("ptxd_lib_dgen: add order-only dependency
to extract") introduced better interleaving of extract stages to
optimize IO load during full builds. This also had the effect that in
the above cases all install stages of dependencies were built too, even
when they are not needed at all.
Improve those use cases by only optimizing the extract stage ordering if
at least the prepare stage(s) of the packages being requested are needed
(since the prepare stage depends on the install stages of dependencies,
those will be needed anyway).
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Message-Id: <20200525202209.24858-1-rhi@pengutronix.de>
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ptxdist | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 6635a96a1..6b789d9a7 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -1579,7 +1579,10 @@ parse_second() ######## standard target, directly into make - extract|prepare|compile|install|targetinstall|tags) + prepare|compile|install|targetinstall|tags) + PTXDIST_OPTIMIZE_IO=true + ;& # fallthrough + extract) local cmd_post declare -a pkgs @@ -1764,10 +1767,12 @@ EOF exit ;; go|images) + PTXDIST_OPTIMIZE_IO=true do_${cmd} exit ;; image) + PTXDIST_OPTIMIZE_IO=true if [ ${#} -eq 0 ]; then echo "No image given." exit 1 @@ -1823,6 +1828,7 @@ EOF exit ;; nfsroot) + PTXDIST_OPTIMIZE_IO=true check_premake_compiler && ptxd_make_log ptxd_make_nfsd exit @@ -2564,6 +2570,7 @@ setup_export() { PTXDIST_ICECC_CREATE_ENV \ PTXDIST_LOG_PROMPT \ PTXDIST_OUTPUT_SYNC \ + PTXDIST_OPTIMIZE_IO \ PTXDIST_DIRTY \ PTXDIST_FORCE \ PTXDIST_PEDANTIC \ |