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>
MacroDict.update(GlobalData.gCommandLineDefines)\r
if GlobalData.BuildOptionPcd:\r
for Item in GlobalData.BuildOptionPcd:\r
MacroDict.update(GlobalData.gCommandLineDefines)\r
if GlobalData.BuildOptionPcd:\r
for Item in GlobalData.BuildOptionPcd:\r
+ if type(Item) is tuple:\r
+ continue\r
PcdName, TmpValue = Item.split("=")\r
TmpValue = BuildOptionValue(TmpValue, {})\r
MacroDict[PcdName.strip()] = TmpValue\r
PcdName, TmpValue = Item.split("=")\r
TmpValue = BuildOptionValue(TmpValue, {})\r
MacroDict[PcdName.strip()] = TmpValue\r
else:\r
EdkLogger.error("GenFds", OPTION_MISSING, "Missing active platform")\r
\r
else:\r
EdkLogger.error("GenFds", OPTION_MISSING, "Missing active platform")\r
\r
+ GlobalData.BuildOptionPcd = Options.OptionPcd if Options.OptionPcd else {}\r
GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform))\r
\r
if (Options.ConfDirectory):\r
GenFdsGlobalVariable.ActivePlatform = PathClass(NormPath(ActivePlatform))\r
\r
if (Options.ConfDirectory):\r
FvObj.FvRegionInFD = RegionObj.Size\r
RegionObj.BlockInfoOfRegion(FdObj.BlockSizeList, FvObj)\r
\r
FvObj.FvRegionInFD = RegionObj.Size\r
RegionObj.BlockInfoOfRegion(FdObj.BlockSizeList, FvObj)\r
\r
- GlobalData.BuildOptionPcd = Options.OptionPcd if Options.OptionPcd else {}\r
"""Call GenFds"""\r
GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList)\r
\r
"""Call GenFds"""\r
GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList)\r
\r
Macros.update(self._Symbols)\r
if GlobalData.BuildOptionPcd:\r
for Item in GlobalData.BuildOptionPcd:\r
Macros.update(self._Symbols)\r
if GlobalData.BuildOptionPcd:\r
for Item in GlobalData.BuildOptionPcd:\r
+ if type(Item) is tuple:\r
+ continue\r
PcdName, TmpValue = Item.split("=")\r
TmpValue = BuildOptionValue(TmpValue, self._GuidDict)\r
Macros[PcdName.strip()] = TmpValue\r
PcdName, TmpValue = Item.split("=")\r
TmpValue = BuildOptionValue(TmpValue, self._GuidDict)\r
Macros[PcdName.strip()] = TmpValue\r