summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-09-27 21:18:00 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-09-28 10:10:39 +0800
commit119d8c42ab8b80301d6dbbac2ab19f67a7b2e617 (patch)
tree1cbc1f23c4840946848635f7d787bd42d9bcca24 /BaseTools
parentce9aaba64e07d7e12eb160ae32cde7b3357ce388 (diff)
downloadedk2-119d8c42ab8b80301d6dbbac2ab19f67a7b2e617.tar.gz
edk2-119d8c42ab8b80301d6dbbac2ab19f67a7b2e617.tar.bz2
edk2-119d8c42ab8b80301d6dbbac2ab19f67a7b2e617.zip
BaseTools: Fix the regression bug to build single module
The bug is introduced by 1b8eca to collect single module's build time. Now the fix solution is copied from Platform build. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/build/build.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index dd65c66b65..13d8e503b1 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1832,6 +1832,18 @@ class Build():
if self.ModuleFile.Dir == Module.Dir and self.ModuleFile.File == Module.File:
Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile)
if Ma == None: continue
+ # Not to auto-gen for targets 'clean', 'cleanlib', 'cleanall', 'run', 'fds'
+ if self.Target not in ['clean', 'cleanlib', 'cleanall', 'run', 'fds']:
+ # for target which must generate AutoGen code and makefile
+ if not self.SkipAutoGen or self.Target == 'genc':
+ Ma.CreateCodeFile(True)
+ if self.Target == "genc":
+ continue
+
+ if not self.SkipAutoGen or self.Target == 'genmake':
+ Ma.CreateMakeFile(True)
+ if self.Target == "genmake":
+ continue
MaList.append(Ma)
self.BuildModules.append(Ma)
self.AutoGenTime += int(round((time.time() - AutoGenStart)))