From: "Bob Feng" <bob.c.feng@intel.com>
To: "Rodriguez, Christian" <christian.rodriguez@intel.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Gao, Liming" <liming.gao@intel.com>,
"Zhu, Yonghong" <yonghong.zhu@intel.com>
Subject: Re: [Patch V2] BaseTools: Enhance Bin Cache database to support save the cache
Date: Mon, 22 Apr 2019 02:38:42 +0000 [thread overview]
Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D1600E62BA@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190418141610.2276-1-christian.rodriguez@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-----Original Message-----
From: Rodriguez, Christian
Sent: Thursday, April 18, 2019 10:16 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [Patch V2] BaseTools: Enhance Bin Cache database to support save the cache
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1726
V2: Added the platform name to the path
Add more level sub-directories in the database to support save the cache for multiple platforms with multiple tool-chains and targets, just like edk2 Build output.
Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 8648fc40ed..31721a6f9f 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3897,18 +3897,17 @@ class ModuleAutoGen(AutoGen):
self.CopyModuleToCache()
def CopyModuleToCache(self):
- FileDir = path.join(GlobalData.gBinCacheDest, self.Arch, self.SourceDir, self.MetaFile.BaseName)
+ FileDir = path.join(GlobalData.gBinCacheDest,
+ self.PlatformInfo.Name, self.BuildTarget + "_" + self.ToolChain,
+ self.Arch, self.SourceDir, self.MetaFile.BaseName)
CreateDirectory (FileDir)
HashFile = path.join(self.BuildDir, self.Name + '.hash')
if os.path.exists(HashFile):
shutil.copy2(HashFile, FileDir)
- if self.IsLibrary:
- return
- ModuleFile = path.join(self.OutputDir, self.Name + '.inf')
- if os.path.exists(ModuleFile):
- shutil.copy2(ModuleFile, FileDir)
+ if not self.IsLibrary:
+ ModuleFile = path.join(self.OutputDir, self.Name + '.inf')
+ if os.path.exists(ModuleFile):
+ shutil.copy2(ModuleFile, FileDir)
if not self.OutputFile:
- Ma = self.BuildDatabase[PathClass(ModuleFile), self.Arch, self.BuildTarget, self.ToolChain]
+ Ma = self.BuildDatabase[self.MetaFile, self.Arch,
+ self.BuildTarget, self.ToolChain]
self.OutputFile = Ma.Binaries
if self.OutputFile:
for File in self.OutputFile:
@@ -3930,7 +3929,7 @@ class ModuleAutoGen(AutoGen):
for f_ext in self.SourceFileList:
if '.inc' in str(f_ext):
return False
- FileDir = path.join(GlobalData.gBinCacheSource, self.Arch, self.SourceDir, self.MetaFile.BaseName)
+ FileDir = path.join(GlobalData.gBinCacheSource,
+ self.PlatformInfo.Name, self.BuildTarget + "_" + self.ToolChain,
+ self.Arch, self.SourceDir, self.MetaFile.BaseName)
HashFile = path.join(FileDir, self.Name + '.hash')
if os.path.exists(HashFile):
f = open(HashFile, 'r')
--
2.19.1.windows.1
prev parent reply other threads:[~2019-04-22 2:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 14:16 [Patch V2] BaseTools: Enhance Bin Cache database to support save the cache Christian Rodriguez
2019-04-22 2:38 ` Bob Feng [this message]
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=08650203BA1BD64D8AD9B6D5D74A85D1600E62BA@SHSMSX101.ccr.corp.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