BaseTools: Fixed issue in MultiThread Genfds function
https://bugzilla.tianocore.org/show_bug.cgi?id=1450 In the Multiple thread Genfds feature, build tool generates GenSec, GenFFS command in Makefile. The Non-Hii Driver does not generate .offset file for uni string offset, but the build tool has not knowledge about this in autogen phase. So in this patch, I add a check in Makefile for GenSec command. If the GenSec input file does not exist, the GenSec will not be called. And if GenSec command is not called, its output file, which is also the input file of GenFfs command, will also not exist.So for GenFfs command, I add a new command parameter -oi which means the input file is an optional input file which would not exist. so that I can generate GenFfs command with "-oi" parameter in Makefile. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -1663,7 +1663,7 @@ class Build():
|
||||
# Add ffs build to makefile
|
||||
CmdListDict = {}
|
||||
if GlobalData.gEnableGenfdsMultiThread and self.Fdf:
|
||||
CmdListDict = self._GenFfsCmd()
|
||||
CmdListDict = self._GenFfsCmd(Wa.ArchList)
|
||||
|
||||
for Arch in Wa.ArchList:
|
||||
GlobalData.gGlobalDefines['ARCH'] = Arch
|
||||
@ -1756,7 +1756,7 @@ class Build():
|
||||
# Add ffs build to makefile
|
||||
CmdListDict = None
|
||||
if GlobalData.gEnableGenfdsMultiThread and self.Fdf:
|
||||
CmdListDict = self._GenFfsCmd()
|
||||
CmdListDict = self._GenFfsCmd(Wa.ArchList)
|
||||
self.Progress.Stop("done!")
|
||||
MaList = []
|
||||
ExitFlag = threading.Event()
|
||||
@ -1875,11 +1875,11 @@ class Build():
|
||||
#
|
||||
self._SaveMapFile (MapBuffer, Wa)
|
||||
|
||||
def _GenFfsCmd(self):
|
||||
def _GenFfsCmd(self,ArchList):
|
||||
# convert dictionary of Cmd:(Inf,Arch)
|
||||
# to a new dictionary of (Inf,Arch):Cmd,Cmd,Cmd...
|
||||
CmdSetDict = defaultdict(set)
|
||||
GenFfsDict = GenFds.GenFfsMakefile('', GlobalData.gFdfParser, self, self.ArchList, GlobalData)
|
||||
GenFfsDict = GenFds.GenFfsMakefile('', GlobalData.gFdfParser, self, ArchList, GlobalData)
|
||||
for Cmd in GenFfsDict:
|
||||
tmpInf, tmpArch = GenFfsDict[Cmd]
|
||||
CmdSetDict[tmpInf, tmpArch].add(Cmd)
|
||||
@ -1923,7 +1923,7 @@ class Build():
|
||||
# Add ffs build to makefile
|
||||
CmdListDict = None
|
||||
if GlobalData.gEnableGenfdsMultiThread and self.Fdf:
|
||||
CmdListDict = self._GenFfsCmd()
|
||||
CmdListDict = self._GenFfsCmd(Wa.ArchList)
|
||||
|
||||
# multi-thread exit flag
|
||||
ExitFlag = threading.Event()
|
||||
|
Reference in New Issue
Block a user