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