diff options
author | Yi Li <yi1.li@intel.com> | 2022-03-22 15:26:11 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-03-26 00:59:18 +0000 |
commit | bf9230a9f3dde065c3c8b4175ccd32e44e8f0362 (patch) | |
tree | 8c005e0d609d13c709ed72a129626df7a6ccf98a /BaseTools/Source/Python/Workspace/WorkspaceCommon.py | |
parent | 69218d5d2854acaa7a11c777244de4a297d2fbb9 (diff) | |
download | edk2-bf9230a9f3dde065c3c8b4175ccd32e44e8f0362.tar.gz edk2-bf9230a9f3dde065c3c8b4175ccd32e44e8f0362.tar.bz2 edk2-bf9230a9f3dde065c3c8b4175ccd32e44e8f0362.zip |
BaseTools: Add the FeatureFlagExpression usage to the Source Section
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3828
FeatureFlagExpression Support in Source section of INF file. The Pcd
value in the expression is from INF or DEC.
When a FeatureFlagExpression is present,if the expression evaluates
to TRUE,then the entry is valid. If the expression evaluates to FALSE,
then the EDK II build tools must ignore the entry.
This patch is going to add this feature.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Heng Luo <heng.luo@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Yi Li <yi1.li@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/WorkspaceCommon.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py index 53027a0e30..6564a34ba7 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -75,6 +75,11 @@ def GetDeclaredPcd(Platform, BuildDatabase, Arch, Target, Toolchain, additionalP break
if (PcdCName, PcdTokenName) not in DecPcds:
DecPcds[PcdCName, PcdTokenName] = Pkg.Pcds[Pcd]
+ if not GlobalData.gPlatformFinalPcds.get(Arch):
+ GlobalData.gPlatformFinalPcds[Arch] = OrderedDict()
+ for Name,Guid in DecPcds:
+ if DecPcds[Name,Guid].Type == 'FeatureFlag' or DecPcds[Name, Guid].Type == 'FixedAtBuild':
+ GlobalData.gPlatformFinalPcds[Arch]['%s.%s'%(Guid, Name)]=DecPcds[Name, Guid].DefaultValue
return DecPcds, GuidDict
## Get all dependent libraries for a module
|