diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-07-27 16:29:38 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2016-07-29 16:14:12 +0800 |
commit | 25193a3339a72814d17f7aeda127cacfb6eb2409 (patch) | |
tree | 19949c38d3a26a1a3ce587b87a3c48bfe86bb2fc /BaseTools/Source | |
parent | d6c3ef2ed14186a2dd1afb8016ac4e816ccd18e2 (diff) | |
download | edk2-25193a3339a72814d17f7aeda127cacfb6eb2409.zip edk2-25193a3339a72814d17f7aeda127cacfb6eb2409.tar.gz edk2-25193a3339a72814d17f7aeda127cacfb6eb2409.tar.bz2 |
BaseTools: Add build info for binary modules that only list in FDF file
If the binary module is list in the FDF file but not list in the DSC
file, current build report would not include these binary module's info
in the report "Module section". The patch fix this issue.
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')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 4 | ||||
-rw-r--r-- | BaseTools/Source/Python/build/BuildReport.py | 18 |
2 files changed, 21 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 9a95014..9c548be 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1942,6 +1942,10 @@ class PlatformAutoGen(AutoGen): # @retval library_list List of library instances sorted
#
def ApplyLibraryInstance(self, Module):
+ # Cover the case that the binary INF file is list in the FDF file but not DSC file, return empty list directly
+ if str(Module) not in self.Platform.Modules:
+ return []
+
ModuleType = Module.ModuleType
# for overridding library instances with module specific setting
diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index ef99989..4c57754 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -47,6 +47,9 @@ from Common.DataType import TAB_BACK_SLASH from Common.LongFilePathSupport import OpenLongFilePath as open
from Common.MultipleWorkspace import MultipleWorkspace as mws
import Common.GlobalData as GlobalData
+from AutoGen.AutoGen import ModuleAutoGen
+from Common.Misc import PathClass
+from Common.String import NormPath
## Pattern to extract contents in EDK DXS files
gDxsDependencyPattern = re.compile(r"DEPENDENCY_START(.+)DEPENDENCY_END", re.DOTALL)
@@ -1647,8 +1650,21 @@ class PlatformReport(object): else:
self._IsModuleBuild = False
for Pa in Wa.AutoGenObjectList:
+ ModuleAutoGenList = []
for ModuleKey in Pa.Platform.Modules:
- self.ModuleReportList.append(ModuleReport(Pa.Platform.Modules[ModuleKey].M, ReportType))
+ ModuleAutoGenList.append(Pa.Platform.Modules[ModuleKey].M)
+ if GlobalData.gFdfParser != None:
+ if Pa.Arch in GlobalData.gFdfParser.Profile.InfDict:
+ INFList = GlobalData.gFdfParser.Profile.InfDict[Pa.Arch]
+ for InfName in INFList:
+ InfClass = PathClass(NormPath(InfName), Wa.WorkspaceDir, Pa.Arch)
+ Ma = ModuleAutoGen(Wa, InfClass, Pa.BuildTarget, Pa.ToolChain, Pa.Arch, Wa.MetaFile)
+ if Ma == None:
+ continue
+ if Ma not in ModuleAutoGenList:
+ ModuleAutoGenList.append(Ma)
+ for MGen in ModuleAutoGenList:
+ self.ModuleReportList.append(ModuleReport(MGen, ReportType))
|