BaseTools: Enable --genfds-multi-thread to default build

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1302

This patch enable --genfds-multi-thread to default build.
This patch keep --genfds-multi-thread build option for
compatibility and also add a new build option to disable
genfds-multi-thread as --no-genfds-multi-thread.

Cc: Liming Gao <liming.gao@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:
Feng, Bob C 2019-09-06 21:22:58 +08:00
parent f23da86415
commit 7809492c10
7 changed files with 14 additions and 11 deletions

View File

@ -1580,8 +1580,8 @@ class TopLevelMakefile(BuildFile):
if GlobalData.gCaseInsensitive:
ExtraOption += " -c"
if GlobalData.gEnableGenfdsMultiThread:
ExtraOption += " --genfds-multi-thread"
if not GlobalData.gEnableGenfdsMultiThread:
ExtraOption += " --no-genfds-multi-thread"
if GlobalData.gIgnoreSource:
ExtraOption += " --ignore-sources"

View File

@ -833,8 +833,7 @@ class WorkspaceAutoGen(AutoGen):
elif LogLevel == EdkLogger.QUIET:
FdsCommandDict["quiet"] = True
if GlobalData.gEnableGenfdsMultiThread:
FdsCommandDict["GenfdsMultiThread"] = True
FdsCommandDict["GenfdsMultiThread"] = GlobalData.gEnableGenfdsMultiThread
if GlobalData.gIgnoreSource:
FdsCommandDict["IgnoreSources"] = True

View File

@ -106,7 +106,7 @@ gBinCacheSource = None
gPlatformHash = None
gPackageHash = {}
gModuleHash = {}
gEnableGenfdsMultiThread = False
gEnableGenfdsMultiThread = True
gSikpAutoGenCache = set()
# Dictionary for tracking Module build status as success or failure

View File

@ -84,7 +84,8 @@ def MyOptionParser():
Parser.add_option("--hash", action="store_true", dest="UseHashCache", default=False, help="Enable hash-based caching during build process.")
Parser.add_option("--binary-destination", action="store", type="string", dest="BinCacheDest", help="Generate a cache of binary files in the specified directory.")
Parser.add_option("--binary-source", action="store", type="string", dest="BinCacheSource", help="Consume a cache of binary files from the specified directory.")
Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=False, help="Enable GenFds multi thread to generate ffs file.")
Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=True, help="Enable GenFds multi thread to generate ffs file.")
Parser.add_option("--no-genfds-multi-thread", action="store_true", dest="NoGenfdsMultiThread", default=False, help="Disable GenFds multi thread to generate ffs file.")
Parser.add_option("--disable-include-path-check", action="store_true", dest="DisableIncludePathCheck", default=False, help="Disable the include path check for outside of package.")
(Opt, Args) = Parser.parse_args()
return (Opt, Args)

View File

@ -93,7 +93,7 @@ def resetFdsGlobalVariable():
GenFdsGlobalVariable.SecCmdList = []
GenFdsGlobalVariable.CopyList = []
GenFdsGlobalVariable.ModuleFile = ''
GenFdsGlobalVariable.EnableGenfdsMultiThread = False
GenFdsGlobalVariable.EnableGenfdsMultiThread = True
GenFdsGlobalVariable.LargeFileInFvFlags = []
GenFdsGlobalVariable.EFI_FIRMWARE_FILE_SYSTEM3_GUID = '5473C07A-3DCB-4dca-BD6F-1E9689E7349A'
@ -140,6 +140,8 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None):
GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + Workspace)
if FdsCommandDict.get("GenfdsMultiThread"):
GenFdsGlobalVariable.EnableGenfdsMultiThread = True
else:
GenFdsGlobalVariable.EnableGenfdsMultiThread = False
os.chdir(GenFdsGlobalVariable.WorkSpaceDir)
# set multiple workspace
@ -402,7 +404,7 @@ def OptionsToCommandDict(Options):
FdsCommandDict["quiet"] = Options.quiet
FdsCommandDict["debug"] = Options.debug
FdsCommandDict["Workspace"] = Options.Workspace
FdsCommandDict["GenfdsMultiThread"] = Options.GenfdsMultiThread
FdsCommandDict["GenfdsMultiThread"] = not Options.NoGenfdsMultiThread
FdsCommandDict["fdf_file"] = [PathClass(Options.filename)] if Options.filename else []
FdsCommandDict["build_target"] = Options.BuildTarget
FdsCommandDict["toolchain_tag"] = Options.ToolChain
@ -459,7 +461,8 @@ def myOptionParser():
Parser.add_option("--conf", action="store", type="string", dest="ConfDirectory", help="Specify the customized Conf directory.")
Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")
Parser.add_option("--pcd", action="append", dest="OptionPcd", help="Set PCD value by command line. Format: \"PcdName=Value\" ")
Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=False, help="Enable GenFds multi thread to generate ffs file.")
Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=True, help="Enable GenFds multi thread to generate ffs file.")
Parser.add_option("--no-genfds-multi-thread", action="store_true", dest="NoGenfdsMultiThread", default=False, help="Disable GenFds multi thread to generate ffs file.")
Options, _ = Parser.parse_args()
return Options

View File

@ -69,7 +69,7 @@ class GenFdsGlobalVariable:
SecCmdList = []
CopyList = []
ModuleFile = ''
EnableGenfdsMultiThread = False
EnableGenfdsMultiThread = True
#
# The list whose element are flags to indicate if large FFS or SECTION files exist in FV.

View File

@ -731,7 +731,7 @@ class Build():
GlobalData.gUseHashCache = BuildOptions.UseHashCache
GlobalData.gBinCacheDest = BuildOptions.BinCacheDest
GlobalData.gBinCacheSource = BuildOptions.BinCacheSource
GlobalData.gEnableGenfdsMultiThread = BuildOptions.GenfdsMultiThread
GlobalData.gEnableGenfdsMultiThread = not BuildOptions.NoGenfdsMultiThread
GlobalData.gDisableIncludePathCheck = BuildOptions.DisableIncludePathCheck
if GlobalData.gBinCacheDest and not GlobalData.gUseHashCache: