- PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, 'IA32', GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
- if PlatformDataBase != None:\r
- if InfFileKey in PlatformDataBase.Modules:\r
- DscArchList.append ('IA32')\r
-\r
- PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, 'X64', GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
- if PlatformDataBase != None:\r
- if InfFileKey in PlatformDataBase.Modules:\r
- DscArchList.append ('X64')\r
-\r
- PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, 'IPF', GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
- if PlatformDataBase != None:\r
- if InfFileKey in (PlatformDataBase.Modules):\r
- DscArchList.append ('IPF')\r
-\r
- PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, 'ARM', GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
- if PlatformDataBase != None:\r
- if InfFileKey in (PlatformDataBase.Modules):\r
- DscArchList.append ('ARM')\r
-\r
- PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, 'EBC', GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
- if PlatformDataBase != None:\r
- if InfFileKey in (PlatformDataBase.Modules):\r
- DscArchList.append ('EBC')\r
-\r
- PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, 'AARCH64', GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
- if PlatformDataBase != None:\r
- if InfFileKey in (PlatformDataBase.Modules):\r
- DscArchList.append ('AARCH64')\r
+ for Arch in GenFdsGlobalVariable.ArchList :\r
+ PlatformDataBase = GenFdsGlobalVariable.WorkSpace.BuildObject[GenFdsGlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFdsGlobalVariable.ToolChainTag]\r
+ if PlatformDataBase is not None:\r
+ if InfFileKey in PlatformDataBase.Modules:\r
+ DscArchList.append (Arch)\r
+ else:\r
+ #\r
+ # BaseTools support build same module more than once, the module path with FILE_GUID overridden has\r
+ # the file name FILE_GUIDmodule.inf, then PlatformDataBase.Modules use FILE_GUIDmodule.inf as key,\r
+ # but the path (self.MetaFile.Path) is the real path\r
+ #\r
+ for key in PlatformDataBase.Modules.keys():\r
+ if InfFileKey == str((PlatformDataBase.Modules[key]).MetaFile.Path):\r
+ DscArchList.append (Arch)\r
+ break\r