BaseTools: Fixed the bug of multi-thread genffs for override inf
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302 If there is a inf override, and multi-thread genffs is enabled, build will fail. This patch is going to fix this bug. Cc: Liming Gao <liming.gao@intel.com> Cc: Steven Shi <steven.shi@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -241,7 +241,7 @@ class AutoGenWorkerInProcess(mp.Process):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
Ma.CreateCodeFile(False)
|
Ma.CreateCodeFile(False)
|
||||||
Ma.CreateMakeFile(False,GenFfsList=FfsCmd.get((Ma.MetaFile.File, Ma.Arch),[]))
|
Ma.CreateMakeFile(False,GenFfsList=FfsCmd.get((Ma.MetaFile.Path, Ma.Arch),[]))
|
||||||
|
|
||||||
if GlobalData.gBinCacheSource and CommandTarget in [None, "", "all"]:
|
if GlobalData.gBinCacheSource and CommandTarget in [None, "", "all"]:
|
||||||
Ma.GenMakeHeaderFilesHash(GlobalData.gCacheIR)
|
Ma.GenMakeHeaderFilesHash(GlobalData.gCacheIR)
|
||||||
|
@ -2123,7 +2123,7 @@ class ModuleAutoGen(AutoGen):
|
|||||||
self.CreateCodeFile()
|
self.CreateCodeFile()
|
||||||
if not (self.MetaFile.Path, self.Arch) in gDict or \
|
if not (self.MetaFile.Path, self.Arch) in gDict or \
|
||||||
not gDict[(self.MetaFile.Path, self.Arch)].CreateMakeFileDone:
|
not gDict[(self.MetaFile.Path, self.Arch)].CreateMakeFileDone:
|
||||||
self.CreateMakeFile(GenFfsList=GlobalData.FfsCmd.get((self.MetaFile.File, self.Arch),[]))
|
self.CreateMakeFile(GenFfsList=GlobalData.FfsCmd.get((self.MetaFile.Path, self.Arch),[]))
|
||||||
|
|
||||||
if not (self.MetaFile.Path, self.Arch) in gDict or \
|
if not (self.MetaFile.Path, self.Arch) in gDict or \
|
||||||
not gDict[(self.MetaFile.Path, self.Arch)].CreateCodeFileDone or \
|
not gDict[(self.MetaFile.Path, self.Arch)].CreateCodeFileDone or \
|
||||||
|
@ -502,7 +502,10 @@ class FfsInfStatement(FfsInfStatementClassObject):
|
|||||||
if self.IsBinaryModule:
|
if self.IsBinaryModule:
|
||||||
IsMakefile = False
|
IsMakefile = False
|
||||||
if IsMakefile:
|
if IsMakefile:
|
||||||
MakefilePath = self.InfFileName, Arch
|
PathClassObj = PathClass(self.InfFileName, GenFdsGlobalVariable.WorkSpaceDir)
|
||||||
|
if self.OverrideGuid:
|
||||||
|
PathClassObj = ProcessDuplicatedInf(PathClassObj, self.OverrideGuid, GenFdsGlobalVariable.WorkSpaceDir)
|
||||||
|
MakefilePath = PathClassObj.Path, Arch
|
||||||
if isinstance (Rule, RuleSimpleFile.RuleSimpleFile):
|
if isinstance (Rule, RuleSimpleFile.RuleSimpleFile):
|
||||||
SectionOutputList = self.__GenSimpleFileSection__(Rule, IsMakefile=IsMakefile)
|
SectionOutputList = self.__GenSimpleFileSection__(Rule, IsMakefile=IsMakefile)
|
||||||
FfsOutput = self.__GenSimpleFileFfs__(Rule, SectionOutputList, MakefilePath=MakefilePath)
|
FfsOutput = self.__GenSimpleFileFfs__(Rule, SectionOutputList, MakefilePath=MakefilePath)
|
||||||
|
@ -843,7 +843,7 @@ class Build():
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
PcdMa.CreateCodeFile(False)
|
PcdMa.CreateCodeFile(False)
|
||||||
PcdMa.CreateMakeFile(False,GenFfsList = DataPipe.Get("FfsCommand").get((PcdMa.MetaFile.File, PcdMa.Arch),[]))
|
PcdMa.CreateMakeFile(False,GenFfsList = DataPipe.Get("FfsCommand").get((PcdMa.MetaFile.Path, PcdMa.Arch),[]))
|
||||||
|
|
||||||
if GlobalData.gBinCacheSource and self.Target in [None, "", "all"]:
|
if GlobalData.gBinCacheSource and self.Target in [None, "", "all"]:
|
||||||
PcdMa.GenMakeHeaderFilesHash(share_data)
|
PcdMa.GenMakeHeaderFilesHash(share_data)
|
||||||
@ -1881,9 +1881,9 @@ class Build():
|
|||||||
return True
|
return True
|
||||||
if not self.SkipAutoGen or self.Target == 'genmake':
|
if not self.SkipAutoGen or self.Target == 'genmake':
|
||||||
self.Progress.Start("Generating makefile")
|
self.Progress.Start("Generating makefile")
|
||||||
if CmdListDict and self.Fdf and (Module.File, Arch) in CmdListDict:
|
if CmdListDict and self.Fdf and (Module.Path, Arch) in CmdListDict:
|
||||||
Ma.CreateMakeFile(True, CmdListDict[Module.File, Arch])
|
Ma.CreateMakeFile(True, CmdListDict[Module.Path, Arch])
|
||||||
del CmdListDict[Module.File, Arch]
|
del CmdListDict[Module.Path, Arch]
|
||||||
else:
|
else:
|
||||||
Ma.CreateMakeFile(True)
|
Ma.CreateMakeFile(True)
|
||||||
self.Progress.Stop("done!")
|
self.Progress.Stop("done!")
|
||||||
|
Reference in New Issue
Block a user