]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/TargetTool/TargetTool.py
Sync EDKII BaseTools to BaseTools project r2065.
[mirror_edk2.git] / BaseTools / Source / Python / TargetTool / TargetTool.py
index 68c55718bcc718d91b066f2ad0e69e4dec94765c..7993023150c4e57ea31a51e76bf09b3c6cbb28d9 100644 (file)
@@ -33,7 +33,6 @@ class TargetTool():
         self.TargetTxtDictionary = {\r
             TAB_TAT_DEFINES_ACTIVE_PLATFORM                            : None,\r
             TAB_TAT_DEFINES_TOOL_CHAIN_CONF                            : None,\r
-            TAB_TAT_DEFINES_MULTIPLE_THREAD                            : None,\r
             TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER               : None,\r
             TAB_TAT_DEFINES_TARGET                                     : None,\r
             TAB_TAT_DEFINES_TOOL_CHAIN_TAG                             : None,\r
@@ -44,7 +43,7 @@ class TargetTool():
 \r
     def LoadTargetTxtFile(self, filename):\r
         if os.path.exists(filename) and os.path.isfile(filename):\r
-             return self.ConvertTextFileToDict(filename, '#', '=')\r
+            return self.ConvertTextFileToDict(filename, '#', '=')\r
         else:\r
             raise ParseError('LoadTargetTxtFile() : No Target.txt file exists.')\r
             return 1\r
@@ -64,7 +63,7 @@ class TargetTool():
                     Key = LineList[0].strip()\r
                     if Key.startswith(CommentCharacter) == False and Key in self.TargetTxtDictionary.keys():\r
                         if Key == TAB_TAT_DEFINES_ACTIVE_PLATFORM or Key == TAB_TAT_DEFINES_TOOL_CHAIN_CONF \\r
-                          or Key == TAB_TAT_DEFINES_MULTIPLE_THREAD or Key == TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER \\r
+                          or Key == TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER \\r
                           or Key == TAB_TAT_DEFINES_ACTIVE_MODULE:\r
                             self.TargetTxtDictionary[Key] = LineList[1].replace('\\', '/').strip()\r
                         elif Key == TAB_TAT_DEFINES_TARGET or Key == TAB_TAT_DEFINES_TARGET_ARCH \\r
@@ -149,15 +148,13 @@ def GetConfigureKeyValue(self, Key):
         else:\r
             EdkLogger.error("TagetTool", BuildToolError.FILE_NOT_FOUND, \r
                             "Tooldef file %s does not exist!" % self.Opt.TOOL_DEFINITION_FILE, RaiseError=False)\r
-    elif Key == TAB_TAT_DEFINES_MULTIPLE_THREAD and self.Opt.NUM != None:\r
-        if self.Opt.NUM >= 2:\r
-            Line = "%-30s = %s\n" % (Key, 'Enable')\r
-        else:\r
-            Line = "%-30s = %s\n" % (Key, 'Disable')\r
+\r
+    elif self.Opt.NUM >= 2:\r
+        Line = "%-30s = %s\n" % (Key, 'Enable')\r
+    elif self.Opt.NUM <= 1:\r
+        Line = "%-30s = %s\n" % (Key, 'Disable')        \r
     elif Key == TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER and self.Opt.NUM != None:\r
         Line = "%-30s = %s\n" % (Key, str(self.Opt.NUM))\r
-    elif Key == TAB_TAT_DEFINES_MULTIPLE_THREAD and self.Opt.ENABLE_MULTI_THREAD != None:\r
-        Line = "%-30s = %s\n" % (Key, self.Opt.ENABLE_MULTI_THREAD)\r
     elif Key == TAB_TAT_DEFINES_TARGET and self.Opt.TARGET != None:\r
         Line = "%-30s = %s\n" % (Key, ''.join(elem + ' ' for elem in self.Opt.TARGET))\r
     elif Key == TAB_TAT_DEFINES_TARGET_ARCH and self.Opt.TARGET_ARCH != None:\r
@@ -216,8 +213,6 @@ def MyOptionParser():
         help="Specify the build rule configure file, which replaces target.txt's BUILD_RULE_CONF definition. If not specified, the default value Conf/build_rule.txt will be set.")\r
     parser.add_option("-m", "--multithreadnum", action="callback", type="int", dest="NUM", callback=RangeCheckCallback,\r
         help="Specify the multi-thread number which replace target.txt's MAX_CONCURRENT_THREAD_NUMBER. If the value is less than 2, MULTIPLE_THREAD will be disabled. If the value is larger than 1, MULTIPLE_THREAD will be enabled.")\r
-    parser.add_option("-e", "--enablemultithread", action="store", type="choice", choices=['Enable', 'Disable'], dest="ENABLE_MULTI_THREAD", \r
-        help="Specify whether enable multi-thread! If Enable, multi-thread is enabled; If Disable, mutli-thread is disable")\r
     (opt, args)=parser.parse_args()\r
     return (opt, args)\r
 \r