Move the GlobalData.BuildOptionPcd before FdfParser() function

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong....@intel.com>
---
 BaseTools/Source/Python/GenFds/GenFds.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/GenFds/GenFds.py 
b/BaseTools/Source/Python/GenFds/GenFds.py
index 4c56cbb..e3cc77f 100644
--- a/BaseTools/Source/Python/GenFds/GenFds.py
+++ b/BaseTools/Source/Python/GenFds/GenFds.py
@@ -268,10 +268,12 @@ def main():
 
             if not os.path.exists(OutputDir):
                 EdkLogger.error("GenFds", FILE_NOT_FOUND, ExtraData=OutputDir)
             GenFdsGlobalVariable.OutputDirDict[Key] = OutputDir
 
+        GlobalData.BuildOptionPcd     = Options.OptionPcd if Options.OptionPcd 
else {}
+
         """ Parse Fdf file, has to place after build Workspace as FDF may 
contain macros from DSC file """
         FdfParserObj = FdfParser.FdfParser(FdfFilename)
         FdfParserObj.ParseFile()
 
         if FdfParserObj.CycleReferenceCheck():
@@ -324,11 +326,10 @@ def main():
                                         EdkLogger.error("GenFds", 
FORMAT_INVALID, "The FV %s's region is specified in multiple FD with different 
value." %FvObj.UiFvName)
                                 else:
                                     FvObj.FvRegionInFD = RegionObj.Size
                                     
RegionObj.BlockInfoOfRegion(FdObj.BlockSizeList, FvObj)
 
-        GlobalData.BuildOptionPcd     = Options.OptionPcd if Options.OptionPcd 
else {}
         """Call GenFds"""
         GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList)
 
         """Generate GUID cross reference file"""
         GenFds.GenerateGuidXRefFile(BuildWorkSpace, ArchList, FdfParserObj)
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to