]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools: AutoGen and GenFds share the parser data.
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index 6ad0e389687ce5c501b6eaebfe5d3685ab355350..cf864d0ef51908c3e6fd58470a162be5151f6335 100644 (file)
@@ -36,7 +36,6 @@ from subprocess import *
 from Common import Misc as Utils\r
 \r
 from Common.LongFilePathSupport import OpenLongFilePath as open\r
-from Common.LongFilePathSupport import LongFilePath\r
 from Common.TargetTxtClassObject import *\r
 from Common.ToolDefClassObject import *\r
 from Common.DataType import *\r
@@ -52,7 +51,7 @@ from PatchPcdValue.PatchPcdValue import *
 \r
 import Common.EdkLogger\r
 import Common.GlobalData as GlobalData\r
-from GenFds.GenFds import GenFds\r
+from GenFds.GenFds import GenFds, GenFdsApi\r
 \r
 from collections import OrderedDict, defaultdict\r
 \r
@@ -933,7 +932,7 @@ class Build():
             if TAB_TOD_DEFINES_FAMILY not in ToolDefinition or Tool not in ToolDefinition[TAB_TOD_DEFINES_FAMILY] \\r
                or not ToolDefinition[TAB_TOD_DEFINES_FAMILY][Tool]:\r
                 EdkLogger.warn("build", "No tool chain family found in configuration for %s. Default to MSFT." % Tool)\r
-                ToolChainFamily.append("MSFT")\r
+                ToolChainFamily.append(TAB_COMPILER_MSFT)\r
             else:\r
                 ToolChainFamily.append(ToolDefinition[TAB_TOD_DEFINES_FAMILY][Tool])\r
         self.ToolChainFamily = ToolChainFamily\r
@@ -1006,7 +1005,7 @@ class Build():
         else:\r
             self.Db.InitDatabase()\r
             self.Db_Flag = True\r
-            Platform = self.Db._MapPlatform(str(self.PlatformFile))\r
+            Platform = self.Db.MapPlatform(str(self.PlatformFile))\r
             self.Prebuild = str(Platform.Prebuild)\r
         if self.Prebuild:\r
             PrebuildList = []\r
@@ -1045,7 +1044,7 @@ class Build():
         if 'POSTBUILD' in GlobalData.gCommandLineDefines:\r
             self.Postbuild = GlobalData.gCommandLineDefines.get('POSTBUILD')\r
         else:\r
-            Platform = self.Db._MapPlatform(str(self.PlatformFile))\r
+            Platform = self.Db.MapPlatform(str(self.PlatformFile))\r
             self.Postbuild = str(Platform.Postbuild)\r
         if self.Postbuild:\r
             PostbuildList = []\r
@@ -1392,7 +1391,7 @@ class Build():
 \r
         # genfds\r
         if Target == 'fds':\r
-            LaunchCommand(AutoGenObject.GenFdsCommand, AutoGenObject.MakeFileDir)\r
+            GenFdsApi(AutoGenObject.GenFdsCommandDict, self.Db)\r
             return True\r
 \r
         # run\r
@@ -2136,7 +2135,7 @@ class Build():
                         # Generate FD image if there's a FDF file found\r
                         #\r
                         GenFdsStart = time.time()\r
-                        LaunchCommand(Wa.GenFdsCommand, os.getcwd())\r
+                        GenFdsApi(Wa.GenFdsCommandDict, self.Db)\r
 \r
                         #\r
                         # Create MAP file for all platform FVs after GenFds.\r