public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools: improve C tools build time with GNU
@ 2017-12-05 18:08 Leif Lindholm
  2017-12-05 18:42 ` Leif Lindholm
  0 siblings, 1 reply; 2+ messages in thread
From: Leif Lindholm @ 2017-12-05 18:08 UTC (permalink / raw)
  To: edk2-devel; +Cc: Yonghong Zhu, Liming Gao

Commit 9e1131b70b4b
("BaseTools: Update BaseTools top GNUMakefile with the clear dependency")
made parallel builds of BaseTools possible. However, the two utilities
BrotliCompress and VfrCompile have substantially longer build (and
especially link) time than the others - which leads to long waiting
times. Build these two tools separately first, in order to reduce build
time.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---

For comparison, this reduces the build time on my x86 machine (8 cores,
16 threads) down from >9s to <3s.
On the Cortex-A53 based 24-core SynQuacer platform, it takes the build
time down from 1m26s to 20s.

 BaseTools/Source/C/GNUmakefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
index 0dc748267d..b7ddcb5022 100644
--- a/BaseTools/Source/C/GNUmakefile
+++ b/BaseTools/Source/C/GNUmakefile
@@ -50,9 +50,11 @@ all: makerootdir subdirs
 LIBRARIES = Common
 VFRAUTOGEN = VfrCompile/VfrLexer.h
 # NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage
-APPLICATIONS = \
+SLOW_APPLICATIONS = \
   BrotliCompress \
-  VfrCompile \
+  VfrCompile
+
+APPLICATIONS = \
   GnuGenBootSector \
   BootSectImage \
   EfiLdrImage \
@@ -72,7 +74,8 @@ APPLICATIONS = \
 SUBDIRS := $(LIBRARIES) $(APPLICATIONS)
 
 $(LIBRARIES): $(MAKEROOT)/libs
-$(APPLICATIONS): $(LIBRARIES) $(MAKEROOT)/bin $(VFRAUTOGEN)
+$(SLOW_APPLICATIONS): $(LIBRARIES) $(MAKEROOT)/bin $(VFRAUTOGEN)
+$(APPLICATIONS): $(SLOW_APPLICATIONS)
 
 .PHONY: outputdirs
 makerootdir:
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-05 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05 18:08 [PATCH] BaseTools: improve C tools build time with GNU Leif Lindholm
2017-12-05 18:42 ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox