[edk2] [PATCH] BaseTools: improve C tools build time with GNU

Leif Lindholm posted 1 patch 7 years ago
Failed in applying to current master (apply log)
BaseTools/Source/C/GNUmakefile | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
[edk2] [PATCH] BaseTools: improve C tools build time with GNU
Posted by Leif Lindholm 7 years ago
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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] BaseTools: improve C tools build time with GNU
Posted by Leif Lindholm 7 years ago
Hah, no ignore this.

I managed to not make it build the slow tools...

Back to the drawing board.

On Tue, Dec 05, 2017 at 06:08:14PM +0000, Leif Lindholm wrote:
> 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
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel