]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Enable --genfds-multi-thread to default build
authorFeng, Bob C <bob.c.feng@intel.com>
Fri, 6 Sep 2019 13:22:58 +0000 (21:22 +0800)
committerFeng, Bob C <bob.c.feng@intel.com>
Wed, 11 Sep 2019 01:43:59 +0000 (09:43 +0800)
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>
BaseTools/Source/Python/AutoGen/GenMake.py
BaseTools/Source/Python/AutoGen/WorkspaceAutoGen.py
BaseTools/Source/Python/Common/GlobalData.py
BaseTools/Source/Python/Common/buildoptions.py
BaseTools/Source/Python/GenFds/GenFds.py
BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py
BaseTools/Source/Python/build/build.py

index 47dae82e1aeb46d862c5e69037b95395081d6bf7..4f85a93055abb6e09d6c988d269224b372d888e8 100755 (executable)
@@ -1580,8 +1580,8 @@ class TopLevelMakefile(BuildFile):
 \r
         if GlobalData.gCaseInsensitive:\r
             ExtraOption += " -c"\r
-        if GlobalData.gEnableGenfdsMultiThread:\r
-            ExtraOption += " --genfds-multi-thread"\r
+        if not GlobalData.gEnableGenfdsMultiThread:\r
+            ExtraOption += " --no-genfds-multi-thread"\r
         if GlobalData.gIgnoreSource:\r
             ExtraOption += " --ignore-sources"\r
 \r
index f9d2c216169cdfd3ccc0141f3d92bd0d4b3ca48e..9d8040905eacb820ce39d99c478e33b66f650a50 100644 (file)
@@ -833,8 +833,7 @@ class WorkspaceAutoGen(AutoGen):
         elif LogLevel == EdkLogger.QUIET:\r
             FdsCommandDict["quiet"] = True\r
 \r
-        if GlobalData.gEnableGenfdsMultiThread:\r
-            FdsCommandDict["GenfdsMultiThread"] = True\r
+        FdsCommandDict["GenfdsMultiThread"] = GlobalData.gEnableGenfdsMultiThread\r
         if GlobalData.gIgnoreSource:\r
             FdsCommandDict["IgnoreSources"] = True\r
 \r
index 61327ad8f10e5d5af46e92adeea08d85387e4290..8eb72aa1d6f589705ddeb25765e9dbd2c0a39572 100755 (executable)
@@ -106,7 +106,7 @@ gBinCacheSource = None
 gPlatformHash = None\r
 gPackageHash = {}\r
 gModuleHash = {}\r
-gEnableGenfdsMultiThread = False\r
+gEnableGenfdsMultiThread = True\r
 gSikpAutoGenCache = set()\r
 \r
 # Dictionary for tracking Module build status as success or failure\r
index 7161aa66f23e6ab915086e22fc84a6b77ef3bff6..a717c58d8c9a9a42f6548d4f61728dd65da0d158 100644 (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.")\r
     Parser.add_option("--binary-destination", action="store", type="string", dest="BinCacheDest", help="Generate a cache of binary files in the specified directory.")\r
     Parser.add_option("--binary-source", action="store", type="string", dest="BinCacheSource", help="Consume a cache of binary files from the specified directory.")\r
-    Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=False, help="Enable GenFds multi thread to generate ffs file.")\r
+    Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=True, help="Enable GenFds multi thread to generate ffs file.")\r
+    Parser.add_option("--no-genfds-multi-thread", action="store_true", dest="NoGenfdsMultiThread", default=False, help="Disable GenFds multi thread to generate ffs file.")\r
     Parser.add_option("--disable-include-path-check", action="store_true", dest="DisableIncludePathCheck", default=False, help="Disable the include path check for outside of package.")\r
     (Opt, Args) = Parser.parse_args()\r
     return (Opt, Args)\r
index 51943411ad1f72b09a8203fd4ea23b22e2935425..d8bc28e4d0f8ed4b85a07980dc76cd39a2cc14e5 100644 (file)
@@ -93,7 +93,7 @@ def resetFdsGlobalVariable():
     GenFdsGlobalVariable.SecCmdList = []\r
     GenFdsGlobalVariable.CopyList   = []\r
     GenFdsGlobalVariable.ModuleFile = ''\r
-    GenFdsGlobalVariable.EnableGenfdsMultiThread = False\r
+    GenFdsGlobalVariable.EnableGenfdsMultiThread = True\r
 \r
     GenFdsGlobalVariable.LargeFileInFvFlags = []\r
     GenFdsGlobalVariable.EFI_FIRMWARE_FILE_SYSTEM3_GUID = '5473C07A-3DCB-4dca-BD6F-1E9689E7349A'\r
@@ -140,6 +140,8 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None):
                 GenFdsGlobalVariable.VerboseLogger("Using Workspace:" + Workspace)\r
             if FdsCommandDict.get("GenfdsMultiThread"):\r
                 GenFdsGlobalVariable.EnableGenfdsMultiThread = True\r
+            else:\r
+                GenFdsGlobalVariable.EnableGenfdsMultiThread = False\r
         os.chdir(GenFdsGlobalVariable.WorkSpaceDir)\r
 \r
         # set multiple workspace\r
@@ -402,7 +404,7 @@ def OptionsToCommandDict(Options):
     FdsCommandDict["quiet"] = Options.quiet\r
     FdsCommandDict["debug"] = Options.debug\r
     FdsCommandDict["Workspace"] = Options.Workspace\r
-    FdsCommandDict["GenfdsMultiThread"] = Options.GenfdsMultiThread\r
+    FdsCommandDict["GenfdsMultiThread"] = not Options.NoGenfdsMultiThread\r
     FdsCommandDict["fdf_file"] = [PathClass(Options.filename)] if Options.filename else []\r
     FdsCommandDict["build_target"] = Options.BuildTarget\r
     FdsCommandDict["toolchain_tag"] = Options.ToolChain\r
@@ -459,7 +461,8 @@ def myOptionParser():
     Parser.add_option("--conf", action="store", type="string", dest="ConfDirectory", help="Specify the customized Conf directory.")\r
     Parser.add_option("--ignore-sources", action="store_true", dest="IgnoreSources", default=False, help="Focus to a binary build and ignore all source files")\r
     Parser.add_option("--pcd", action="append", dest="OptionPcd", help="Set PCD value by command line. Format: \"PcdName=Value\" ")\r
-    Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=False, help="Enable GenFds multi thread to generate ffs file.")\r
+    Parser.add_option("--genfds-multi-thread", action="store_true", dest="GenfdsMultiThread", default=True, help="Enable GenFds multi thread to generate ffs file.")\r
+    Parser.add_option("--no-genfds-multi-thread", action="store_true", dest="NoGenfdsMultiThread", default=False, help="Disable GenFds multi thread to generate ffs file.")\r
 \r
     Options, _ = Parser.parse_args()\r
     return Options\r
index 0f691ae52420f5baab9e9803a00fbfb67260450e..3dc73c8f61f9bd068778cbf7dca4fbeb7b81aade 100644 (file)
@@ -69,7 +69,7 @@ class GenFdsGlobalVariable:
     SecCmdList = []\r
     CopyList   = []\r
     ModuleFile = ''\r
-    EnableGenfdsMultiThread = False\r
+    EnableGenfdsMultiThread = True\r
 \r
     #\r
     # The list whose element are flags to indicate if large FFS or SECTION files exist in FV.\r
index d314c015aa5c33666e3b2ed9deb4a1dad38e4d69..e81d3d64867c5c3acb7e2bec178c80c6f8bc84bd 100755 (executable)
@@ -731,7 +731,7 @@ class Build():
         GlobalData.gUseHashCache = BuildOptions.UseHashCache\r
         GlobalData.gBinCacheDest   = BuildOptions.BinCacheDest\r
         GlobalData.gBinCacheSource = BuildOptions.BinCacheSource\r
-        GlobalData.gEnableGenfdsMultiThread = BuildOptions.GenfdsMultiThread\r
+        GlobalData.gEnableGenfdsMultiThread = not BuildOptions.NoGenfdsMultiThread\r
         GlobalData.gDisableIncludePathCheck = BuildOptions.DisableIncludePathCheck\r
 \r
         if GlobalData.gBinCacheDest and not GlobalData.gUseHashCache:\r