From: "Steven Shi" <steven.shi@intel.com>
To: devel@edk2.groups.io
Cc: liming.gao@intel.com, bob.c.feng@intel.com
Subject: [PATCH v2 1/4] BaseTools: store more complete output files in binary cache
Date: Tue, 3 Dec 2019 13:17:15 +0800 [thread overview]
Message-ID: <20191203051718.22508-2-steven.shi@intel.com> (raw)
In-Reply-To: <20191203051718.22508-1-steven.shi@intel.com>
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 <liming.gao@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Signed-off-by: Steven Shi <steven.shi@intel.com>
---
.../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 1111d5de25..fce00c3ee7 100755
--- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
@@ -1308,28 +1308,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.17.1
next prev parent reply other threads:[~2019-12-03 5:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 5:17 [PATCH v2 0/4] BaseTools: Leverage compiler output dependency files for binary cache Steven Shi
2019-12-03 5:17 ` Steven Shi [this message]
2019-12-03 5:17 ` [PATCH v2 2/4] BaseTools: enhance the CacheCopyFile method arg names Steven Shi
2019-12-03 5:17 ` [PATCH v2 3/4] BaseTools: Leverage compiler output to optimize binary cache Steven Shi
2019-12-03 5:17 ` [PATCH v2 4/4] BaseTools: Remove redundant binary cache file Steven Shi
2019-12-03 5:33 ` [PATCH v2 0/4] BaseTools: Leverage compiler output dependency files for binary cache Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191203051718.22508-2-steven.shi@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox