]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Fix a bug --pcd option enable and use the pcd in expression
authorYonghong Zhu <yonghong.zhu@intel.com>
Tue, 16 Oct 2018 08:10:24 +0000 (16:10 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Thu, 18 Oct 2018 01:36:27 +0000 (09:36 +0800)
the case is:
in the DSC:
[PcdsFixedAtBuild.common]
 TokenSpaceGuid.TestFixedPcd|0xFFEAA000

[PcdsDynamicExDefault.common.DEFAULT]
!if TokenSpaceGuid.PcdFlag == TRUE
TokenSpaceGuid.PcdTest|TokenSpaceGuid.TestFixedPcd
!endif

Then build with --pcd TokenSpaceGuid.PcdFlag=TRUE, it report failure,
but if we build without this --pcd option, it could build success.
we found when the --pcd is enabled, the fixedatbuild pcds are not be
collected into expression to calculate.

Fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=1256
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/Workspace/DscBuildData.py

index 7854e71db6939160e38e903001620712d9a78fe0..e481ea4f64781a1c0b33c1fedb94da3e431fb279 100644 (file)
@@ -2946,4 +2946,5 @@ class DscBuildData(PlatformBuildClassObject):
                 ModuleData = self._Bdb[ModuleFile, self._Arch, self._Target, self._Toolchain]\r
                 PkgSet.update(ModuleData.Packages)\r
             self._DecPcds, self._GuidDict = GetDeclaredPcd(self, self._Bdb, self._Arch, self._Target, self._Toolchain, PkgSet)\r
+            self._GuidDict.update(GlobalData.gPlatformPcds)\r
         return self._DecPcds\r