]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix the regression issue caused by commit dc4c77
authorYonghong Zhu <yonghong.zhu@intel.com>
Wed, 22 Feb 2017 15:38:01 +0000 (23:38 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 23 Feb 2017 05:13:24 +0000 (13:13 +0800)
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>
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py

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