summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
authorYi Li <yi1.li@intel.com>2022-03-22 10:26:11 +0300
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-03-26 03:59:18 +0300
commitbf9230a9f3dde065c3c8b4175ccd32e44e8f0362 (patch)
tree8c005e0d609d13c709ed72a129626df7a6ccf98a /BaseTools/Source/Python/Common
parent69218d5d2854acaa7a11c777244de4a297d2fbb9 (diff)
downloadedk2-bf9230a9f3dde065c3c8b4175ccd32e44e8f0362.tar.xz
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/Common')
-rw-r--r--BaseTools/Source/Python/Common/Expression.py2
-rwxr-xr-xBaseTools/Source/Python/Common/GlobalData.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Common/Expression.py b/BaseTools/Source/Python/Common/Expression.py
index 07ca039a9c..31bf0e4b6c 100644
--- a/BaseTools/Source/Python/Common/Expression.py
+++ b/BaseTools/Source/Python/Common/Expression.py
@@ -43,7 +43,7 @@ ERR_IN_OPERAND = 'Macro after IN operator can only be: $(FAMILY), $(ARC
__ValidString = re.compile(r'[_a-zA-Z][_0-9a-zA-Z]*$')
_ReLabel = re.compile('LABEL\((\w+)\)')
_ReOffset = re.compile('OFFSET_OF\((\w+)\)')
-PcdPattern = re.compile(r'[_a-zA-Z][0-9A-Za-z_]*\.[_a-zA-Z][0-9A-Za-z_]*$')
+PcdPattern = re.compile(r'^[_a-zA-Z][0-9A-Za-z_]*\.[_a-zA-Z][0-9A-Za-z_]*$')
## SplitString
# Split string to list according double quote
diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py
index 61ab3f7e24..197bd83666 100755
--- a/BaseTools/Source/Python/Common/GlobalData.py
+++ b/BaseTools/Source/Python/Common/GlobalData.py
@@ -18,6 +18,7 @@ gGlobalDefines = {}
gPlatformDefines = {}
# PCD name and value pair for fixed at build and feature flag
gPlatformPcds = {}
+gPlatformFinalPcds = {}
# PCDs with type that are not fixed at build and feature flag
gPlatformOtherPcds = {}
gActivePlatform = None