summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2016-05-11 16:09:26 +0800
committerHao Wu <hao.a.wu@intel.com>2016-07-13 09:33:03 +0800
commit5a13af58fa5ee62e6552deaf25a18c1d04999bec (patch)
tree7e8a174b6c89cee93cc34898145621e70ec36720 /BaseTools
parent50cfd879100c5c3b3b009f252b6b57f724014ec6 (diff)
downloadedk2-platforms-5a13af58fa5ee62e6552deaf25a18c1d04999bec.tar.xz
BaseTools/GenFds: enhance INF built arch filter
The bug is use FILE_GUID override to build the same module more than once, GenFds report warning "xxx NOT found in DSC file; Is it really a binary module?". The root cause is the module path with FILE_GUID overridden has the file name FILE_GUIDmodule.inf, then PlatformDataBase.Modules use FILE_GUIDmodule.inf as key which cause __GetPlatformArchList__ return empty. 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> (cherry picked from commit 4ce415e55d93a9ae9fa1fbd6b40080877ae5f23b)
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/GenFds/FfsInfStatement.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index bba42c7308..b0b22d194d 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -570,6 +570,16 @@ class FfsInfStatement(FfsInfStatementClassObject):
if PlatformDataBase != None:
if InfFileKey in PlatformDataBase.Modules:
DscArchList.append (Arch)
+ else:
+ #
+ # BaseTools support build same module more than once, the module path with FILE_GUID overridden has
+ # the file name FILE_GUIDmodule.inf, then PlatformDataBase.Modules use FILE_GUIDmodule.inf as key,
+ # but the path (self.MetaFile.Path) is the real path
+ #
+ for key in PlatformDataBase.Modules.keys():
+ if InfFileKey == str((PlatformDataBase.Modules[key]).MetaFile.Path):
+ DscArchList.append (Arch)
+ break
return DscArchList