From nobody Fri May 3 05:18:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39300+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39300+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1555596975; cv=none; d=zoho.com; s=zohoarc; b=UsPfzX9qmm7cg/KuRZz44Fwr3fQvzaj4cpLirB4cZRprA6G9iL8jKjHpZXHkDqAqPbD/Fv8ps5mxEro8ZrUQHCBz03mfQF6KFXUWhCmaFJWjTq3qPHAzS1jz2WpjKpPxH+Yi59Y61t9DjT5amNn3aEk6BnVqQ1T3KyifucNfLpM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555596975; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=P45BaioLInwyvjNK/WS+Wycvf9V7axDU+26gJDycOnE=; b=R+2WQr2Rlq1zZxQ/vVaTGwe7PAeTAEkc/TL1qJNyrtttGjpfczFcICA5EdOCw0rfaG+xlFmMxHpOm9lORPSGA9TdT8T19Dj6Ir6ZTkLKBRj9CJoNETbc5WsAS/dGT+4uvmy0pYszJDSoeqm1uRamxNcX5oyt+Ht5Cyt7nUm1m54= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39300+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1555596974875937.178948194076; Thu, 18 Apr 2019 07:16:14 -0700 (PDT) Return-Path: X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Thu, 18 Apr 2019 07:16:13 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2019 07:16:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,366,1549958400"; d="scan'208";a="224639540" X-Received: from rodrigu3-desk.amr.corp.intel.com ([10.7.163.75]) by orsmga001.jf.intel.com with ESMTP; 18 Apr 2019 07:16:12 -0700 From: "Christian Rodriguez" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yonghong Zhu Subject: [edk2-devel] [Patch V2] BaseTools: Enhance Bin Cache database to support save the cache Date: Thu, 18 Apr 2019 07:16:10 -0700 Message-Id: <20190418141610.2276-1-christian.rodriguez@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,christian.rodriguez@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1555596974; bh=w7GtRTAmS24c8/lR2sCrIcveaXXMainJqNE4OBzlAdk=; h=Cc:Date:From:Reply-To:Subject:To; b=V46916NJdlv9MEtxgEEiL9lKECCwmA/COyiCrtSDSjA2VYxnRwjdSqWN61ef+dAnf9j WM60W1wo4jb+HPxtfSg+j4Pmmt/2Q9MYS/1ii+TtqtQZ+ZITVFLygIWzhJCQoYPWibfMZ NCiDfGS4L3Jx/4sReF1wSY7i2Yb29ObfbJE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1726 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 Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu Reviewed-by: Bob Feng --- 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() =20 def CopyModuleToCache(self): - FileDir =3D path.join(GlobalData.gBinCacheDest, self.Arch, self.So= urceDir, self.MetaFile.BaseName) + FileDir =3D path.join(GlobalData.gBinCacheDest, self.PlatformInfo.= Name, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir, s= elf.MetaFile.BaseName) CreateDirectory (FileDir) HashFile =3D path.join(self.BuildDir, self.Name + '.hash') if os.path.exists(HashFile): shutil.copy2(HashFile, FileDir) - if self.IsLibrary: - return - ModuleFile =3D path.join(self.OutputDir, self.Name + '.inf') - if os.path.exists(ModuleFile): - shutil.copy2(ModuleFile, FileDir) + if not self.IsLibrary: + ModuleFile =3D path.join(self.OutputDir, self.Name + '.inf') + if os.path.exists(ModuleFile): + shutil.copy2(ModuleFile, FileDir) if not self.OutputFile: - Ma =3D self.BuildDatabase[PathClass(ModuleFile), self.Arch, se= lf.BuildTarget, self.ToolChain] + Ma =3D self.BuildDatabase[self.MetaFile, self.Arch, self.Build= Target, self.ToolChain] self.OutputFile =3D 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 =3D path.join(GlobalData.gBinCacheSource, self.Arch, self.= SourceDir, self.MetaFile.BaseName) + FileDir =3D path.join(GlobalData.gBinCacheSource, self.PlatformInf= o.Name, self.BuildTarget + "_" + self.ToolChain, self.Arch, self.SourceDir,= self.MetaFile.BaseName) HashFile =3D path.join(FileDir, self.Name + '.hash') if os.path.exists(HashFile): f =3D open(HashFile, 'r') --=20 2.19.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39300): https://edk2.groups.io/g/devel/message/39300 Mute This Topic: https://groups.io/mt/31223880/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-