summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-02-22 23:38:01 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-02-23 13:13:24 +0800
commit1d8cebf91040e74f6c82352edd5c5cccf6b69853 (patch)
tree1c18e2d60741af539849f5f78380ea69123a45df
parent526f160f311c6d1540df68590712fdd70c2df0bc (diff)
downloadedk2-platforms-1d8cebf91040e74f6c82352edd5c5cccf6b69853.tar.xz
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>
-rw-r--r--BaseTools/Source/Python/Workspace/WorkspaceDatabase.py4
1 files changed, 2 insertions, 2 deletions
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