summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/build/build.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-06-08 21:54:23 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-06-24 23:05:27 +0800
commit16bad1fbaf897ecd93fb5046f4fed768ac12b6ff (patch)
treeb284498ed9b8ac8c304180f5fcfb5f43675e1dfc /BaseTools/Source/Python/build/build.py
parent9f14de3b8eb9520d0c88b03335d91763a8d64c0f (diff)
downloadedk2-16bad1fbaf897ecd93fb5046f4fed768ac12b6ff.tar.gz
edk2-16bad1fbaf897ecd93fb5046f4fed768ac12b6ff.tar.bz2
edk2-16bad1fbaf897ecd93fb5046f4fed768ac12b6ff.zip
BaseTools: support building the same INF more than once with -m option
Currently DSC file [Components] Section can support building the same INF more than once for the same arch, this patch support build with -m option to generate multiple instances. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/build/build.py')
-rw-r--r--BaseTools/Source/Python/build/build.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index fd94ae69d2..ae8aa2fa38 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -1736,12 +1736,15 @@ class Build():
MaList = []
for Arch in Wa.ArchList:
GlobalData.gGlobalDefines['ARCH'] = Arch
- Ma = ModuleAutoGen(Wa, self.ModuleFile, BuildTarget, ToolChain, Arch, self.PlatformFile)
- if Ma == None: continue
- MaList.append(Ma)
- self.BuildModules.append(Ma)
- if not Ma.IsBinaryModule:
- self._Build(self.Target, Ma, BuildModule=True)
+ 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
+ MaList.append(Ma)
+ self.BuildModules.append(Ma)
+ if not Ma.IsBinaryModule:
+ self._Build(self.Target, Ma, BuildModule=True)
self.BuildReport.AddPlatformReport(Wa, MaList)
if MaList == []: