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/GenFds/GenFds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/GenFds/GenFds.py') diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py index 4c56cbb02a..03126e35f4 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -142,6 +142,7 @@ def main(): else: EdkLogger.error("GenFds", OPTION_MISSING, "Missing active platform") + GlobalData.BuildOptionPcd = Options.OptionPcd if Options.OptionPcd else {} GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform)) if (Options.ConfDirectory): @@ -326,7 +327,6 @@ def main(): FvObj.FvRegionInFD = RegionObj.Size RegionObj.BlockInfoOfRegion(FdObj.BlockSizeList, FvObj) - GlobalData.BuildOptionPcd = Options.OptionPcd if Options.OptionPcd else {} """Call GenFds""" GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList) -- cgit v1.2.3