public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch] BaseTools: Fix a bug --pcd option enable and use the pcd in expression
@ 2018-10-17  0:35 Yonghong Zhu
  2018-10-18  1:04 ` Gao, Liming
  0 siblings, 1 reply; 3+ messages in thread
From: Yonghong Zhu @ 2018-10-17  0:35 UTC (permalink / raw)
  To: edk2-devel

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>
---
 BaseTools/Source/Python/Workspace/DscBuildData.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py
index f41038e..ace348b 100644
--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
@@ -2942,6 +2942,7 @@ class DscBuildData(PlatformBuildClassObject):
                 if ModuleFile in self._Modules:
                     continue
                 ModuleData = self._Bdb[ModuleFile, self._Arch, self._Target, self._Toolchain]
                 PkgSet.update(ModuleData.Packages)
             self._DecPcds, self._GuidDict = GetDeclaredPcd(self, self._Bdb, self._Arch, self._Target, self._Toolchain, PkgSet)
+            self._GuidDict.update(GlobalData.gPlatformPcds)
         return self._DecPcds
-- 
2.6.1.windows.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Patch] BaseTools: Fix a bug --pcd option enable and use the pcd in expression
  2018-10-17  0:35 [Patch] BaseTools: Fix a bug --pcd option enable and use the pcd in expression Yonghong Zhu
@ 2018-10-18  1:04 ` Gao, Liming
  2018-10-18 14:18   ` Carsey, Jaben
  0 siblings, 1 reply; 3+ messages in thread
From: Gao, Liming @ 2018-10-18  1:04 UTC (permalink / raw)
  To: Zhu, Yonghong, edk2-devel@lists.01.org

Reviewed-by: Liming Gao <liming.gao@intel.com>

>-----Original Message-----
>From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>Yonghong Zhu
>Sent: Wednesday, October 17, 2018 8:36 AM
>To: edk2-devel@lists.01.org
>Subject: [edk2] [Patch] BaseTools: Fix a bug --pcd option enable and use the
>pcd in expression
>
>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>
>---
> BaseTools/Source/Python/Workspace/DscBuildData.py | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
>b/BaseTools/Source/Python/Workspace/DscBuildData.py
>index f41038e..ace348b 100644
>--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
>+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
>@@ -2942,6 +2942,7 @@ class DscBuildData(PlatformBuildClassObject):
>                 if ModuleFile in self._Modules:
>                     continue
>                 ModuleData = self._Bdb[ModuleFile, self._Arch, self._Target,
>self._Toolchain]
>                 PkgSet.update(ModuleData.Packages)
>             self._DecPcds, self._GuidDict = GetDeclaredPcd(self, self._Bdb,
>self._Arch, self._Target, self._Toolchain, PkgSet)
>+            self._GuidDict.update(GlobalData.gPlatformPcds)
>         return self._DecPcds
>--
>2.6.1.windows.1
>
>_______________________________________________
>edk2-devel mailing list
>edk2-devel@lists.01.org
>https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Patch] BaseTools: Fix a bug --pcd option enable and use the pcd in expression
  2018-10-18  1:04 ` Gao, Liming
@ 2018-10-18 14:18   ` Carsey, Jaben
  0 siblings, 0 replies; 3+ messages in thread
From: Carsey, Jaben @ 2018-10-18 14:18 UTC (permalink / raw)
  To: Gao, Liming, Zhu, Yonghong, edk2-devel@lists.01.org

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Gao, Liming
> Sent: Wednesday, October 17, 2018 6:04 PM
> To: Zhu, Yonghong <yonghong.zhu@intel.com>; edk2-devel@lists.01.org
> Subject: Re: [edk2] [Patch] BaseTools: Fix a bug --pcd option enable and use
> the pcd in expression
> 
> Reviewed-by: Liming Gao <liming.gao@intel.com>
> 
> >-----Original Message-----
> >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> >Yonghong Zhu
> >Sent: Wednesday, October 17, 2018 8:36 AM
> >To: edk2-devel@lists.01.org
> >Subject: [edk2] [Patch] BaseTools: Fix a bug --pcd option enable and use the
> >pcd in expression
> >
> >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>
> >---
> > BaseTools/Source/Python/Workspace/DscBuildData.py | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py
> >b/BaseTools/Source/Python/Workspace/DscBuildData.py
> >index f41038e..ace348b 100644
> >--- a/BaseTools/Source/Python/Workspace/DscBuildData.py
> >+++ b/BaseTools/Source/Python/Workspace/DscBuildData.py
> >@@ -2942,6 +2942,7 @@ class DscBuildData(PlatformBuildClassObject):
> >                 if ModuleFile in self._Modules:
> >                     continue
> >                 ModuleData = self._Bdb[ModuleFile, self._Arch, self._Target,
> >self._Toolchain]
> >                 PkgSet.update(ModuleData.Packages)
> >             self._DecPcds, self._GuidDict = GetDeclaredPcd(self, self._Bdb,
> >self._Arch, self._Target, self._Toolchain, PkgSet)
> >+            self._GuidDict.update(GlobalData.gPlatformPcds)
> >         return self._DecPcds
> >--
> >2.6.1.windows.1
> >
> >_______________________________________________
> >edk2-devel mailing list
> >edk2-devel@lists.01.org
> >https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-18 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-17  0:35 [Patch] BaseTools: Fix a bug --pcd option enable and use the pcd in expression Yonghong Zhu
2018-10-18  1:04 ` Gao, Liming
2018-10-18 14:18   ` Carsey, Jaben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox