]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
BaseTools: Fix the lib order in static_library_files.lst
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / ModuleAutoGen.py
index f610365f6dee5c3f248c8cf18afe982b8626c3b2..f0812b6887be6f9fbdb14003f2efff229633fb34 100755 (executable)
@@ -1267,29 +1267,30 @@ class ModuleAutoGen(AutoGen):
     @cached_property\r
     def OutputFile(self):\r
         retVal = set()\r
+\r
         OutputDir = self.OutputDir.replace('\\', '/').strip('/')\r
         DebugDir = self.DebugDir.replace('\\', '/').strip('/')\r
-        FfsOutputDir = self.FfsOutputDir.replace('\\', '/').rstrip('/')\r
         for Item in self.CodaTargetList:\r
             File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')\r
-            retVal.add(File)\r
-        if self.DepexGenerated:\r
-            retVal.add(self.Name + '.depex')\r
+            NewFile = path.join(self.OutputDir, File)\r
+            retVal.add(NewFile)\r
 \r
         Bin = self._GenOffsetBin()\r
         if Bin:\r
-            retVal.add(Bin)\r
+            NewFile = path.join(self.OutputDir, Bin)\r
+            retVal.add(NewFile)\r
 \r
-        for Root, Dirs, Files in os.walk(OutputDir):\r
+        for Root, Dirs, Files in os.walk(self.OutputDir):\r
             for File in Files:\r
-                if File.lower().endswith('.pdb'):\r
-                    retVal.add(File)\r
+                # lib file is already added through above CodaTargetList, skip it here\r
+                if not (File.lower().endswith('.obj') or File.lower().endswith('.lib')):\r
+                    NewFile = path.join(self.OutputDir, File)\r
+                    retVal.add(NewFile)\r
 \r
-        for Root, Dirs, Files in os.walk(FfsOutputDir):\r
+        for Root, Dirs, Files in os.walk(self.FfsOutputDir):\r
             for File in Files:\r
-                if File.lower().endswith('.ffs') or File.lower().endswith('.offset') or File.lower().endswith('.raw') \\r
-                    or File.lower().endswith('.raw.txt'):\r
-                    retVal.add(File)\r
+                NewFile = path.join(self.FfsOutputDir, File)\r
+                retVal.add(NewFile)\r
 \r
         return retVal\r
 \r
@@ -1659,15 +1660,8 @@ class ModuleAutoGen(AutoGen):
             Ma = self.BuildDatabase[self.MetaFile, self.Arch, self.BuildTarget, self.ToolChain]\r
             self.OutputFile = Ma.Binaries\r
         for File in self.OutputFile:\r
-            File = str(File)\r
-            if not os.path.isabs(File):\r
-                NewFile = os.path.join(self.OutputDir, File)\r
-                if not os.path.exists(NewFile):\r
-                    NewFile = os.path.join(self.FfsOutputDir, File)\r
-                File = NewFile\r
             if os.path.exists(File):\r
-                if File.lower().endswith('.ffs') or File.lower().endswith('.offset') or File.lower().endswith('.raw') \\r
-                    or File.lower().endswith('.raw.txt'):\r
+                if File.startswith(os.path.abspath(self.FfsOutputDir)+os.sep):\r
                     self.CacheCopyFile(FfsDir, self.FfsOutputDir, File)\r
                 else:\r
                     self.CacheCopyFile(FileDir, self.OutputDir, File)\r
@@ -1849,7 +1843,7 @@ class ModuleAutoGen(AutoGen):
         # CanSkip uses timestamps to determine build skipping\r
         if self.CanSkip():\r
             return\r
-\r
+        self.LibraryAutoGenList\r
         AutoGenList = []\r
         IgoredAutoGenList = []\r
 \r
@@ -2066,8 +2060,8 @@ class ModuleAutoGen(AutoGen):
 \r
         if not (self.MetaFile.Path, self.Arch) in gDict or \\r
            not gDict[(self.MetaFile.Path, self.Arch)].ModuleFilesHashDigest:\r
-           EdkLogger.quiet("[cache warning]: Cannot generate ModuleFilesHashDigest for module %s[%s]" %(self.MetaFile.Path, self.Arch))\r
-           return\r
+            EdkLogger.quiet("[cache warning]: Cannot generate ModuleFilesHashDigest for module %s[%s]" %(self.MetaFile.Path, self.Arch))\r
+            return\r
 \r
         # Initialze hash object\r
         m = hashlib.md5()\r
@@ -2129,7 +2123,7 @@ class ModuleAutoGen(AutoGen):
             self.CreateCodeFile()\r
         if not (self.MetaFile.Path, self.Arch) in gDict or \\r
            not gDict[(self.MetaFile.Path, self.Arch)].CreateMakeFileDone:\r
-            self.CreateMakeFile(GenFfsList=GlobalData.FfsCmd.get((self.MetaFile.File, self.Arch),[]))\r
+            self.CreateMakeFile(GenFfsList=GlobalData.FfsCmd.get((self.MetaFile.Path, self.Arch),[]))\r
 \r
         if not (self.MetaFile.Path, self.Arch) in gDict or \\r
            not gDict[(self.MetaFile.Path, self.Arch)].CreateCodeFileDone or \\r