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 <[email protected]>
---

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

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to