summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorZhao, ZhiqiangX <zhiqiangx.zhao@intel.com>2018-11-23 15:04:45 +0800
committerBobCF <bob.c.feng@intel.com>2018-12-07 10:12:05 +0800
commitb3497bad1221704a5dbc5da0b10f42625f1ad2ed (patch)
tree989859b17dcc6b025448be11a0530f8e39670779 /BaseTools/Source/Python/AutoGen/AutoGen.py
parent34e733f2000cfad7645651fac9ab79a237b95481 (diff)
downloadedk2-b3497bad1221704a5dbc5da0b10f42625f1ad2ed.tar.gz
edk2-b3497bad1221704a5dbc5da0b10f42625f1ad2ed.tar.bz2
edk2-b3497bad1221704a5dbc5da0b10f42625f1ad2ed.zip
BaseTools: AutoGen and GenFds share the parser data.
V2: Extract the common part of new API and the original main() function into one function. V1: https://bugzilla.tianocore.org/show_bug.cgi?id=1288 Currently, AutoGen and GenFds run in different python interpreters. The parser are duplicated. This patch is going to create new API for GenFds and have the build to call that API instead of executing GenFds.py. As such, the GenFds and build can share the parser data. This patch is expected to save the time of GenFds about 2~3 seconds. More details will be logged in BZ. This is the summary measure data generated from python cProfile for building Ovmf. Currently: 8379147 function calls (8135450 primitive calls) in 12.580 seconds After applying this patch: 3428712 function calls (3418881 primitive calls) in 8.944 seconds Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: ZhiqiangX Zhao <zhiqiangx.zhao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Carsey Jaben <jaben.carsey@intel.com> Cc: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 25417c4470..12e53010a5 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -935,6 +935,10 @@ class WorkspaceAutoGen(AutoGen):
def GenFdsCommand(self):
return (GenMake.TopLevelMakefile(self)._TEMPLATE_.Replace(GenMake.TopLevelMakefile(self)._TemplateDict)).strip()
+ @property
+ def GenFdsCommandDict(self):
+ return GenMake.TopLevelMakefile(self)._TemplateDict
+
## Create makefile for the platform and modules in it
#
# @param CreateDepsMakeFile Flag indicating if the makefile for