BaseTools: Dsc/Fdf conditional statement parse issue
Set PCD value with --pcd argument not replace DSC/Fdf 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> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
8805bd904a
commit
1fa7fdf6ea
@ -925,6 +925,10 @@ class FdfParser:
|
|||||||
|
|
||||||
MacroDict.update(GlobalData.gGlobalDefines)
|
MacroDict.update(GlobalData.gGlobalDefines)
|
||||||
MacroDict.update(GlobalData.gCommandLineDefines)
|
MacroDict.update(GlobalData.gCommandLineDefines)
|
||||||
|
if GlobalData.BuildOptionPcd:
|
||||||
|
for Item in GlobalData.BuildOptionPcd:
|
||||||
|
PcdName, TmpValue = Item.split("=")
|
||||||
|
MacroDict[PcdName.strip()] = TmpValue
|
||||||
# Highest priority
|
# Highest priority
|
||||||
|
|
||||||
return MacroDict
|
return MacroDict
|
||||||
|
@ -1243,6 +1243,10 @@ class DscParser(MetaFileParser):
|
|||||||
# PCD cannot be referenced in macro definition
|
# PCD cannot be referenced in macro definition
|
||||||
if self._ItemType not in [MODEL_META_DATA_DEFINE, MODEL_META_DATA_GLOBAL_DEFINE]:
|
if self._ItemType not in [MODEL_META_DATA_DEFINE, MODEL_META_DATA_GLOBAL_DEFINE]:
|
||||||
Macros.update(self._Symbols)
|
Macros.update(self._Symbols)
|
||||||
|
if GlobalData.BuildOptionPcd:
|
||||||
|
for Item in GlobalData.BuildOptionPcd:
|
||||||
|
PcdName, TmpValue = Item.split("=")
|
||||||
|
Macros[PcdName.strip()] = TmpValue
|
||||||
return Macros
|
return Macros
|
||||||
|
|
||||||
def _PostProcess(self):
|
def _PostProcess(self):
|
||||||
|
Reference in New Issue
Block a user