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>
This commit is contained in:
@ -736,6 +736,10 @@ class InfParser(MetaFileParser):
|
||||
@ParseMacro
|
||||
def _SourceFileParser(self):
|
||||
TokenList = GetSplitValueList(self._CurrentLine, TAB_VALUE_SPLIT)
|
||||
# Let TokenList[2] be TagName|ToolCode|FeatureFlag
|
||||
if len(TokenList) > 3:
|
||||
for extraToken in range(3, len(TokenList)):
|
||||
TokenList[2] = TokenList[2] + '|' + TokenList[extraToken]
|
||||
self._ValueList[0:len(TokenList)] = TokenList
|
||||
Macros = self._Macros
|
||||
# For Acpi tables, remove macro like ' TABLE_NAME=Sata1'
|
||||
|
Reference in New Issue
Block a user