public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] BaseTools: Dsc conditional statement parse issue
@ 2018-03-01 11:58 Feng, YunhuaX
  0 siblings, 0 replies; only message in thread
From: Feng, YunhuaX @ 2018-03-01 11:58 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Zhu, Yonghong, Gao, Liming

Set PCD value with --pcd argument not replace
DSC PCD value.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1

Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
---
 BaseTools/Source/Python/Workspace/MetaFileParser.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 95ea6fb45a..69a591b8f3 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -1601,10 +1601,15 @@ class DscParser(MetaFileParser):
         if ValList[Index] == 'False':
             ValList[Index] = '0'
 
         if (not self._DirectiveEvalStack) or (False not in self._DirectiveEvalStack):
             GlobalData.gPlatformPcds[TAB_SPLIT.join(self._ValueList[0:2])] = PcdValue
+            if GlobalData.BuildOptionPcd:
+                for Item in GlobalData.BuildOptionPcd:
+                    PcdName, TmpValue = Item.split("=")
+                    if PcdName.strip() == TAB_SPLIT.join(self._ValueList[0:2]):
+                        PcdValue = TmpValue
             self._Symbols[TAB_SPLIT.join(self._ValueList[0:2])] = PcdValue
         try:
             self._ValueList[2] = '|'.join(ValList)
         except Exception:
             print ValList
-- 
2.12.2.windows.2



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-01 11:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-01 11:58 [PATCH] BaseTools: Dsc conditional statement parse issue Feng, YunhuaX

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox