BaseTools: Fix the regression issue caused by commit dc4c77

In the last commit dc4c77, the _GetHeaderInfo will be called more than
once, which cause the self._ConstructorList.append(Value) append some
duplicate value.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yonghong Zhu 2017-02-22 23:38:01 +08:00
parent 526f160f31
commit 1d8cebf910
1 changed files with 2 additions and 2 deletions

View File

@ -1830,8 +1830,6 @@ class InfBuildData(ModuleBuildClassObject):
if self.AutoGenVersion < 0x00010005:
self.__Macros.update(GlobalData.gEdkGlobal)
self.__Macros.update(GlobalData.gGlobalDefines)
else:
self.__Macros.update(self.Defines)
return self.__Macros
## Get architecture
@ -1896,6 +1894,7 @@ class InfBuildData(ModuleBuildClassObject):
if self._Defs == None:
self._Defs = sdict()
self._Defs[Name] = Value
self._Macros[Name] = Value
# some special items in [Defines] section need special treatment
elif Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION', 'EDK_RELEASE_VERSION', 'PI_SPECIFICATION_VERSION'):
if Name in ('EFI_SPECIFICATION_VERSION', 'UEFI_SPECIFICATION_VERSION'):
@ -1956,6 +1955,7 @@ class InfBuildData(ModuleBuildClassObject):
if self._Defs == None:
self._Defs = sdict()
self._Defs[Name] = Value
self._Macros[Name] = Value
#
# Retrieve information in sections specific to Edk.x modules