* [Patch] BaseTools: Structure pcd value assignment
@ 2018-06-25 9:42 BobCF
0 siblings, 0 replies; only message in thread
From: BobCF @ 2018-06-25 9:42 UTC (permalink / raw)
To: edk2-devel; +Cc: Bob Feng, Liming Gao
Enable Structure pcd value assigned by FixedPcd
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
---
.../Source/Python/Workspace/MetaFileParser.py | 23 +++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 88c7bb374c..ac08f39c30 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1609,17 +1609,26 @@ class DscParser(MetaFileParser):
ValList, Valid, Index = AnalyzeDscPcd(self._ValueList[2], self._ItemType)
if not Valid:
EdkLogger.error('build', FORMAT_INVALID, "Pcd format incorrect.", File=self._FileWithError, Line=self._LineIndex + 1,
ExtraData="%s.%s|%s" % (self._ValueList[0], self._ValueList[1], self._ValueList[2]))
PcdValue = ValList[Index]
- if PcdValue and "." not in self._ValueList[0]:
- try:
- ValList[Index] = ValueExpression(PcdValue, self._Macros)(True)
- except WrnExpression, Value:
- ValList[Index] = Value.result
- except:
- pass
+ if PcdValue:
+ if "." not in self._ValueList[0]:
+ try:
+ ValList[Index] = ValueExpression(PcdValue, self._Macros)(True)
+ except WrnExpression, Value:
+ ValList[Index] = Value.result
+ except:
+ pass
+ else:
+ if PcdValue in self._Macros:
+ try:
+ ValList[Index] = ValueExpression(PcdValue, self._Macros)(True)
+ except WrnExpression, Value:
+ ValList[Index] = Value.result
+ except:
+ pass
if ValList[Index] == 'True':
ValList[Index] = '1'
if ValList[Index] == 'False':
ValList[Index] = '0'
--
2.16.2.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-06-25 9:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-25 9:42 [Patch] BaseTools: Structure pcd value assignment BobCF
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox