From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com []) by mx.groups.io with SMTP id smtpd.web12.18856.1574155650687557305 for ; Tue, 19 Nov 2019 01:27:31 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: steven.shi@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Nov 2019 01:27:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,322,1569308400"; d="scan'208";a="209363414" Received: from jshi19-mobl.ccr.corp.intel.com ([10.254.214.80]) by orsmga006.jf.intel.com with ESMTP; 19 Nov 2019 01:27:30 -0800 From: "Steven Shi" To: devel@edk2.groups.io Cc: liming.gao@intel.com, bob.c.feng@intel.com, "Shi, Steven" Subject: [PATCH 1/4] BaseTools: store more complete output files in binary cache Date: Tue, 19 Nov 2019 17:26:58 +0800 Message-Id: <20191119092701.22988-2-steven.shi@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20191119092701.22988-1-steven.shi@intel.com> References: <20191119092701.22988-1-steven.shi@intel.com> From: "Shi, Steven" Binary cache use the OutputFile method to return the module built output files needed to store in cache, but current OutputFile implementation doesn't return complete output files. Enhance the OutputFile method to return more complete output files. Cc: Liming Gao Cc: Bob Feng Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py index 1f45bac846..be87e58f58 100755 --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py @@ -1291,28 +1291,16 @@ class ModuleAutoGen(AutoGen): def OutputFile(self): retVal = set() - OutputDir = self.OutputDir.replace('\\', '/').strip('/') - DebugDir = self.DebugDir.replace('\\', '/').strip('/') - for Item in self.CodaTargetList: - File = Item.Target.Path.replace('\\', '/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/') - NewFile = path.join(self.OutputDir, File) - retVal.add(NewFile) - - Bin = self._GenOffsetBin() - if Bin: - NewFile = path.join(self.OutputDir, Bin) - retVal.add(NewFile) - - for Root, Dirs, Files in os.walk(self.OutputDir): + for Root, Dirs, Files in os.walk(self.BuildDir): for File in Files: # lib file is already added through above CodaTargetList, skip it here - if not (File.lower().endswith('.obj') or File.lower().endswith('.lib')): - NewFile = path.join(self.OutputDir, File) + if not (File.lower().endswith('.obj') or File.lower().endswith('.debug')): + NewFile = path.join(Root, File) retVal.add(NewFile) for Root, Dirs, Files in os.walk(self.FfsOutputDir): for File in Files: - NewFile = path.join(self.FfsOutputDir, File) + NewFile = path.join(Root, File) retVal.add(NewFile) return retVal -- 2.16.1.windows.4