[edk2-devel] [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value
Bob Feng
bob.c.feng at intel.com
Sun Jul 24 05:06:15 UTC 2022
Reviewed-by: Bob Feng <bob.c.feng at intel.com>
-----Original Message-----
From: Li, Yi1 <yi1.li at intel.com>
Sent: Monday, July 11, 2022 1:48 PM
To: devel at edk2.groups.io
Cc: Li, Yi1 <yi1.li at intel.com>; Feng, Bob C <bob.c.feng at intel.com>; Gao, Liming <gaoliming at byosoft.com.cn>
Subject: [PATCH 1/1] BaseTools: INF should use latest Pcd value instead of default value
This patch is a bug fix about FeatureFlagExpression in INF file:
INF [Source] section now unconditionally use Pcd default value in DEC when handling FeatureFlagExpression, it is wrong.
If a Pcd value has been set in the DSC file, we should use latest value in DSC instead of default value.
Cc: Bob Feng <bob.c.feng at intel.com>
Cc: Liming Gao <gaoliming at byosoft.com.cn>
Signed-off-by: Yi Li <yi1.li at intel.com>
---
BaseTools/Source/Python/Workspace/InfBuildData.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py
index 5b9b3d7b4f..e4ff1c6686 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -1084,7 +1084,9 @@ class InfBuildData(ModuleBuildClassObject):
else:
for Name, Guid in self.Pcds:
if self.Pcds[(Name, Guid)].Type == 'FeatureFlag' or self.Pcds[(Name, Guid)].Type == 'FixedAtBuild':
- Pcds['%s.%s' % (Guid, Name)] = self.Pcds[(Name, Guid)].DefaultValue
+ PcdFullName = '%s.%s' % (Guid, Name);
+ if not PcdFullName in Pcds:
+ Pcds[PcdFullName] = self.Pcds[(Name,
+ Guid)].DefaultValue
try:
Value = ValueExpression(Instance, Pcds)()
if Value == True:
--
2.31.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#91758): https://edk2.groups.io/g/devel/message/91758
Mute This Topic: https://groups.io/mt/92304285/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list