BaseTools: change list to set
Order is irelevant duplication is auto-prevented Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
d98cce8e63
commit
ac55e47818
@ -3915,7 +3915,7 @@ class ModuleAutoGen(AutoGen):
|
|||||||
## Create AsBuilt INF file the module
|
## Create AsBuilt INF file the module
|
||||||
#
|
#
|
||||||
def CreateAsBuiltInf(self, IsOnlyCopy = False):
|
def CreateAsBuiltInf(self, IsOnlyCopy = False):
|
||||||
self.OutputFile = []
|
self.OutputFile = set()
|
||||||
if IsOnlyCopy:
|
if IsOnlyCopy:
|
||||||
if GlobalData.gBinCacheDest:
|
if GlobalData.gBinCacheDest:
|
||||||
self.CopyModuleToCache()
|
self.CopyModuleToCache()
|
||||||
@ -4056,8 +4056,7 @@ class ModuleAutoGen(AutoGen):
|
|||||||
DebugDir = self.DebugDir.replace('\\', '/').strip('/')
|
DebugDir = self.DebugDir.replace('\\', '/').strip('/')
|
||||||
for Item in self.CodaTargetList:
|
for Item in self.CodaTargetList:
|
||||||
File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')
|
File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')
|
||||||
if File not in self.OutputFile:
|
self.OutputFile.add(File)
|
||||||
self.OutputFile.append(File)
|
|
||||||
if os.path.isabs(File):
|
if os.path.isabs(File):
|
||||||
File = File.replace('\\', '/').strip('/').replace(OutputDir, '').strip('/')
|
File = File.replace('\\', '/').strip('/').replace(OutputDir, '').strip('/')
|
||||||
if Item.Target.Ext.lower() == '.aml':
|
if Item.Target.Ext.lower() == '.aml':
|
||||||
@ -4069,8 +4068,7 @@ class ModuleAutoGen(AutoGen):
|
|||||||
else:
|
else:
|
||||||
AsBuiltInfDict['binary_item'] += ['BIN|' + File]
|
AsBuiltInfDict['binary_item'] += ['BIN|' + File]
|
||||||
if self.DepexGenerated:
|
if self.DepexGenerated:
|
||||||
if self.Name + '.depex' not in self.OutputFile:
|
self.OutputFile.add(self.Name + '.depex')
|
||||||
self.OutputFile.append(self.Name + '.depex')
|
|
||||||
if self.ModuleType in ['PEIM']:
|
if self.ModuleType in ['PEIM']:
|
||||||
AsBuiltInfDict['binary_item'] += ['PEI_DEPEX|' + self.Name + '.depex']
|
AsBuiltInfDict['binary_item'] += ['PEI_DEPEX|' + self.Name + '.depex']
|
||||||
if self.ModuleType in ['DXE_DRIVER', 'DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER', 'UEFI_DRIVER']:
|
if self.ModuleType in ['DXE_DRIVER', 'DXE_RUNTIME_DRIVER', 'DXE_SAL_DRIVER', 'UEFI_DRIVER']:
|
||||||
@ -4081,15 +4079,13 @@ class ModuleAutoGen(AutoGen):
|
|||||||
Bin = self._GenOffsetBin()
|
Bin = self._GenOffsetBin()
|
||||||
if Bin:
|
if Bin:
|
||||||
AsBuiltInfDict['binary_item'] += ['BIN|%s' % Bin]
|
AsBuiltInfDict['binary_item'] += ['BIN|%s' % Bin]
|
||||||
if Bin not in self.OutputFile:
|
self.OutputFile.add(Bin)
|
||||||
self.OutputFile.append(Bin)
|
|
||||||
|
|
||||||
for Root, Dirs, Files in os.walk(OutputDir):
|
for Root, Dirs, Files in os.walk(OutputDir):
|
||||||
for File in Files:
|
for File in Files:
|
||||||
if File.lower().endswith('.pdb'):
|
if File.lower().endswith('.pdb'):
|
||||||
AsBuiltInfDict['binary_item'] += ['DISPOSABLE|' + File]
|
AsBuiltInfDict['binary_item'] += ['DISPOSABLE|' + File]
|
||||||
if File not in self.OutputFile:
|
self.OutputFile.add(File)
|
||||||
self.OutputFile.append(File)
|
|
||||||
HeaderComments = self.Module.HeaderComments
|
HeaderComments = self.Module.HeaderComments
|
||||||
StartPos = 0
|
StartPos = 0
|
||||||
for Index in range(len(HeaderComments)):
|
for Index in range(len(HeaderComments)):
|
||||||
|
Reference in New Issue
Block a user