* [Patch 0/2] BaseTools: Update C tools GNUMakefile to support parallel make
@ 2017-11-23 16:06 Liming Gao
2017-11-23 16:06 ` [Patch 1/2] BaseTools: Update C tools top GNUMakefile with the clear dependency Liming Gao
2017-11-23 16:06 ` [Patch 2/2] BaseTools: Update C tools top GNUMakefile to adjust tool order Liming Gao
0 siblings, 2 replies; 3+ messages in thread
From: Liming Gao @ 2017-11-23 16:06 UTC (permalink / raw)
To: edk2-devel
GNU make supports -j N to trig multiple job at the same time.
It can reduce make time. This serial can get 60% improvement on BaseTools
C tool clean build with make -j 4.
Liming Gao (2):
BaseTools: Update C tools top GNUMakefile with the clear dependency
BaseTools: Update C tools top GNUMakefile to adjust tool order
BaseTools/Source/C/GNUmakefile | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
--
2.11.0.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Patch 1/2] BaseTools: Update C tools top GNUMakefile with the clear dependency
2017-11-23 16:06 [Patch 0/2] BaseTools: Update C tools GNUMakefile to support parallel make Liming Gao
@ 2017-11-23 16:06 ` Liming Gao
2017-11-23 16:06 ` [Patch 2/2] BaseTools: Update C tools top GNUMakefile to adjust tool order Liming Gao
1 sibling, 0 replies; 3+ messages in thread
From: Liming Gao @ 2017-11-23 16:06 UTC (permalink / raw)
To: edk2-devel
https://bugzilla.tianocore.org/show_bug.cgi?id=786
After GNUmakefile dependency is fixed up, it can make with -j N to enable
multiple thread build in base tools C source and save build time.
In my linux host machine, make -j 4 to compile BaseTools and save ~60% time.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
BaseTools/Source/C/GNUmakefile | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
index 53ddb67439..d067c87081 100644
--- a/BaseTools/Source/C/GNUmakefile
+++ b/BaseTools/Source/C/GNUmakefile
@@ -1,7 +1,7 @@
## @file
# GNU/Linux makefile for C tools build.
#
-# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -44,10 +44,11 @@ MAKEROOT = .
include Makefiles/header.makefile
-all: makerootdir subdirs $(MAKEROOT)/libs
+all: makerootdir subdirs
@echo Finished building BaseTools C Tools with HOST_ARCH=$(HOST_ARCH)
LIBRARIES = Common
+VFRAUTOGEN = VfrCompile/VfrLexer.h
# NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage
APPLICATIONS = \
GnuGenBootSector \
@@ -70,6 +71,9 @@ APPLICATIONS = \
SUBDIRS := $(LIBRARIES) $(APPLICATIONS)
+$(LIBRARIES): $(MAKEROOT)/libs
+$(APPLICATIONS): $(LIBRARIES) $(VFRAUTOGEN) $(MAKEROOT)/bin
+
.PHONY: outputdirs
makerootdir:
-mkdir -p $(MAKEROOT)
@@ -83,6 +87,9 @@ $(SUBDIRS):
$(patsubst %,%-clean,$(sort $(SUBDIRS))):
-$(MAKE) -C $(@:-clean=) clean
+$(VFRAUTOGEN): VfrCompile/VfrSyntax.g
+ $(MAKE) -C VfrCompile VfrLexer.h
+
clean: $(patsubst %,%-clean,$(sort $(SUBDIRS)))
clean: localClean
--
2.11.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Patch 2/2] BaseTools: Update C tools top GNUMakefile to adjust tool order
2017-11-23 16:06 [Patch 0/2] BaseTools: Update C tools GNUMakefile to support parallel make Liming Gao
2017-11-23 16:06 ` [Patch 1/2] BaseTools: Update C tools top GNUMakefile with the clear dependency Liming Gao
@ 2017-11-23 16:06 ` Liming Gao
1 sibling, 0 replies; 3+ messages in thread
From: Liming Gao @ 2017-11-23 16:06 UTC (permalink / raw)
To: edk2-devel
Place the tool that takes much build time at the first. This can improve
build performance when make -j N used.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
---
BaseTools/Source/C/GNUmakefile | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
index d067c87081..d275779c2b 100644
--- a/BaseTools/Source/C/GNUmakefile
+++ b/BaseTools/Source/C/GNUmakefile
@@ -51,9 +51,10 @@ LIBRARIES = Common
VFRAUTOGEN = VfrCompile/VfrLexer.h
# NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage
APPLICATIONS = \
+ BrotliCompress \
+ VfrCompile \
GnuGenBootSector \
BootSectImage \
- BrotliCompress \
EfiLdrImage \
EfiRom \
GenFfs \
@@ -66,8 +67,7 @@ APPLICATIONS = \
LzmaCompress \
Split \
TianoCompress \
- VolInfo \
- VfrCompile
+ VolInfo
SUBDIRS := $(LIBRARIES) $(APPLICATIONS)
--
2.11.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-23 16:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23 16:06 [Patch 0/2] BaseTools: Update C tools GNUMakefile to support parallel make Liming Gao
2017-11-23 16:06 ` [Patch 1/2] BaseTools: Update C tools top GNUMakefile with the clear dependency Liming Gao
2017-11-23 16:06 ` [Patch 2/2] BaseTools: Update C tools top GNUMakefile to adjust tool order Liming Gao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox