]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools: Refactor hash tracking after checking for Sources section
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / AutoGen.py
index 7b35f837f57cb1d1c470688b76853d0a76e4c4d6..3f41fbb507aabd88c3ae918661fce188e10ce533 100644 (file)
@@ -3947,14 +3947,14 @@ class ModuleAutoGen(AutoGen):
                     for root, dir, files in os.walk(FileDir):\r
                         for f in files:\r
                             if self.Name + '.hash' in f:\r
-                                shutil.copy2(HashFile, self.BuildDir)\r
+                                shutil.copy(HashFile, self.BuildDir)\r
                             else:\r
                                 File = path.join(root, f)\r
                                 sub_dir = os.path.relpath(File, FileDir)\r
                                 destination_file = os.path.join(self.OutputDir, sub_dir)\r
                                 destination_dir = os.path.dirname(destination_file)\r
                                 CreateDirectory(destination_dir)\r
-                                shutil.copy2(File, destination_dir)\r
+                                shutil.copy(File, destination_dir)\r
                     if self.Name == "PcdPeim" or self.Name == "PcdDxe":\r
                         CreatePcdDatabaseCode(self, TemplateString(), TemplateString())\r
                     return True\r
@@ -3995,7 +3995,8 @@ class ModuleAutoGen(AutoGen):
             for LibraryAutoGen in self.LibraryAutoGenList:\r
                 LibraryAutoGen.CreateMakeFile()\r
 \r
-        if self.CanSkip():\r
+        # Don't enable if hash feature enabled, CanSkip uses timestamps to determine build skipping\r
+        if not GlobalData.gUseHashCache and self.CanSkip():\r
             return\r
 \r
         if len(self.CustomMakefile) == 0:\r
@@ -4038,7 +4039,8 @@ class ModuleAutoGen(AutoGen):
             for LibraryAutoGen in self.LibraryAutoGenList:\r
                 LibraryAutoGen.CreateCodeFile()\r
 \r
-        if self.CanSkip():\r
+        # Don't enable if hash feature enabled, CanSkip uses timestamps to determine build skipping\r
+        if not GlobalData.gUseHashCache and self.CanSkip():\r
             return\r
 \r
         AutoGenList = []\r