From: Yonghong Zhu Date: Wed, 22 Feb 2017 15:38:01 +0000 (+0800) Subject: BaseTools: Fix the regression issue caused by commit dc4c77 X-Git-Tag: edk2-stable201903~4575 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=1d8cebf91040e74f6c82352edd5c5cccf6b69853 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 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu Tested-by: Ard Biesheuvel Reviewed-by: Liming Gao --- diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index 06867219b7..c1af5c7fe3 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py @@ -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