From 705ed563de86475a32fb555d4238cc10717294f8 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Fri, 9 Mar 2018 15:18:35 +0800 Subject: 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 Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/MetaFileParser.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'BaseTools/Source/Python/Workspace/MetaFileParser.py') diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py index 69bdf2161b..2eb4c75e46 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -1245,6 +1245,8 @@ class DscParser(MetaFileParser): Macros.update(self._Symbols) if GlobalData.BuildOptionPcd: for Item in GlobalData.BuildOptionPcd: + if type(Item) is tuple: + continue PcdName, TmpValue = Item.split("=") TmpValue = BuildOptionValue(TmpValue, self._GuidDict) Macros[PcdName.strip()] = TmpValue -- cgit v1.2.3