summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/FdfParser.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-03-09 15:18:35 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-03-09 16:37:35 +0800
commit705ed563de86475a32fb555d4238cc10717294f8 (patch)
treec5b936c55ed25b473d8ed5d334f0e585eebf6b06 /BaseTools/Source/Python/GenFds/FdfParser.py
parent8565b5829c1f30408020a4adb37074dba5492378 (diff)
downloadedk2-705ed563de86475a32fb555d4238cc10717294f8.tar.gz
edk2-705ed563de86475a32fb555d4238cc10717294f8.tar.bz2
edk2-705ed563de86475a32fb555d4238cc10717294f8.zip
BaseTools: Fix a bug for --pcd used in ConditionalStatement calculate
Move the GlobalData.BuildOptionPcd before FdfParser() function and add type check for Pcd item. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/FdfParser.py')
-rw-r--r--BaseTools/Source/Python/GenFds/FdfParser.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 76d7e6ac19..dda7ed4ce7 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -927,6 +927,8 @@ class FdfParser:
MacroDict.update(GlobalData.gCommandLineDefines)
if GlobalData.BuildOptionPcd:
for Item in GlobalData.BuildOptionPcd:
+ if type(Item) is tuple:
+ continue
PcdName, TmpValue = Item.split("=")
TmpValue = BuildOptionValue(TmpValue, {})
MacroDict[PcdName.strip()] = TmpValue