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 <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <[email protected]>
---
 BaseTools/Source/Python/build/build.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index dd65c66..13d8e50 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1830,10 +1830,22 @@ class Build():
                     Pa = PlatformAutoGen(Wa, self.PlatformFile, BuildTarget, 
ToolChain, Arch)
                     for Module in Pa.Platform.Modules:
                         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)))
                     MakeStart = time.time()
                     for Ma in self.BuildModules:
-- 
2.6.1.windows.1

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

Reply via email to