]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/build/build.py
BaseTools:Replace PlatformInfo with PlatformAutoGen for Moudle
[mirror_edk2.git] / BaseTools / Source / Python / build / build.py
index 13be6c33ecd57999c3f4acb333d0d71bc930b026..bcd832c525f1965292865d3ed2877fc870769316 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
@@ -843,7 +843,7 @@ class Build():
                             continue\r
 \r
                     PcdMa.CreateCodeFile(False)\r
-                    PcdMa.CreateMakeFile(False,GenFfsList = DataPipe.Get("FfsCommand").get((PcdMa.MetaFile.File, PcdMa.Arch),[]))\r
+                    PcdMa.CreateMakeFile(False,GenFfsList = DataPipe.Get("FfsCommand").get((PcdMa.MetaFile.Path, PcdMa.Arch),[]))\r
 \r
                     if GlobalData.gBinCacheSource and self.Target in [None, "", "all"]:\r
                         PcdMa.GenMakeHeaderFilesHash(share_data)\r
@@ -1860,6 +1860,9 @@ class Build():
                             Ma = ModuleAutoGen(Wa, Module, BuildTarget, ToolChain, Arch, self.PlatformFile,Pa.DataPipe)\r
                             if Ma is None:\r
                                 continue\r
+                            if Ma.PcdIsDriver:\r
+                                Ma.PlatformInfo = Pa\r
+                                Ma.Workspace = Wa\r
                             MaList.append(Ma)\r
 \r
                             if GlobalData.gBinCacheSource and self.Target in [None, "", "all"]:\r
@@ -1881,9 +1884,9 @@ class Build():
                                     return True\r
                                 if not self.SkipAutoGen or self.Target == 'genmake':\r
                                     self.Progress.Start("Generating makefile")\r
-                                    if CmdListDict and self.Fdf and (Module.File, Arch) in CmdListDict:\r
-                                        Ma.CreateMakeFile(True, CmdListDict[Module.File, Arch])\r
-                                        del CmdListDict[Module.File, Arch]\r
+                                    if CmdListDict and self.Fdf and (Module.Path, Arch) in CmdListDict:\r
+                                        Ma.CreateMakeFile(True, CmdListDict[Module.Path, Arch])\r
+                                        del CmdListDict[Module.Path, Arch]\r
                                     else:\r
                                         Ma.CreateMakeFile(True)\r
                                     self.Progress.Stop("done!")\r
@@ -2204,6 +2207,7 @@ class Build():
                 if self.SkipAutoGen:\r
                     Wa = self.VerifyAutoGenFiles()\r
                     if Wa is None:\r
+                        self.SkipAutoGen = False\r
                         Wa, self.BuildModules = self.PerformAutoGen(BuildTarget,ToolChain)\r
                     else:\r
                         GlobalData.gAutoGenPhase = True\r