From nobody Mon Feb 9 17:05:30 2026 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+45638+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+45638+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1565810192; cv=none; d=zoho.com; s=zohoarc; b=apDALXDBxMYVGq4oajs0nGBOym9nh7j9sUUaFwkKfGb0k6ItOtbqDRpANiDrNcEYilZnsAIWuH8eDx5P87gcdKMZBQGW0jxNVUa5AesE7Ij6477ImpwiBCAfoQxlAo7lL5aMVoDkfCBEAnGlU4YY/JcT+lj2iDsgsTHSjgNZNuM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565810192; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=URVaz9AxuHH4obncmL0Dt0k8YthdZ9jvgqjWCGTaeAM=; b=Kk4AYIvPXf2WJ010UE+ws2pobNSvSMYn2+FBbNYRfmRhorIURS3k3gkL+ionQJAwa4AuzpP9SGYgpK0XdrEbEGb4l4J0P2gzW2PfVsVAwB4gMhVZfTC+JeE/k8i7FIrn0pE9lNAiLjfhC+t8384kB1Pr2JsPgu3QJpOs/buq+4I= 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+45638+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 1565810192804355.02963231699255; Wed, 14 Aug 2019 12:16:32 -0700 (PDT) Return-Path: X-Received: from mga07.intel.com (mga07.intel.com []) by groups.io with SMTP; Wed, 14 Aug 2019 12:16:31 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 12:16:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,386,1559545200"; d="scan'208";a="176664072" X-Received: from jshi19-mobl.ccr.corp.intel.com ([10.254.213.161]) by fmsmga008.fm.intel.com with ESMTP; 14 Aug 2019 12:16:29 -0700 From: "Steven Shi" To: devel@edk2.groups.io Cc: liming.gao@intel.com, bob.c.feng@intel.com, christian.rodriguez@intel.com, michael.johnson@intel.com, lersek@redhat.com, leif.lindholm@linaro.org, afish@apple.com, stephano.cetola@intel.com, michael.d.kinney@intel.com, "Shi, Steven" Subject: [edk2-devel] [PATCH v5 4/5] BaseTools: Add GenFds multi-thread support in build cache Date: Thu, 15 Aug 2019 03:16:05 +0800 Message-Id: <20190814191606.16532-5-steven.shi@intel.com> In-Reply-To: <20190814191606.16532-1-steven.shi@intel.com> References: <20190814191606.16532-1-steven.shi@intel.com> 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,steven.shi@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1565810192; bh=GJoaC3ixk/xyP7KM53a7Z5sKOb2vCW5H9w9qCoJZuAA=; h=Cc:Date:From:Reply-To:Subject:To; b=HSLF37WNDBECtsnCazh4LwTRnjmRfK8eA2l/m8XiAYrFTDi1f5aSSRpz6ywBJg15V+m j+dTLYVfj/bFIkMwbNVln6fsuEP39nol8MupmQoKFypZbIEPWkEkCqrr26S5s3oD3N+D2 wfA402EIYBB9MhlR77YyGPopI3qtOxGfKMg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1923 Fix the issue that the GenFds multi-thread will build fail if enable the build cache together. Cc: Liming Gao Cc: Bob Feng Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 23 +++++++++++++++++---= --- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/S= ource/Python/AutoGen/ModuleAutoGen.py index 6db3b47a91..c489c3b9c4 100755 --- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py @@ -1262,11 +1262,13 @@ class ModuleAutoGen(AutoGen): fStringIO.close () fInputfile.close () return OutputName + @cached_property def OutputFile(self): retVal =3D set() OutputDir =3D self.OutputDir.replace('\\', '/').strip('/') DebugDir =3D self.DebugDir.replace('\\', '/').strip('/') + FfsOutputDir =3D self.FfsOutputDir.replace('\\', '/').rstrip('/') for Item in self.CodaTargetList: File =3D Item.Target.Path.replace('\\', '/').strip('/').replac= e(DebugDir, '').replace(OutputDir, '').strip('/') retVal.add(File) @@ -1282,6 +1284,12 @@ class ModuleAutoGen(AutoGen): if File.lower().endswith('.pdb'): retVal.add(File) =20 + for Root, Dirs, Files in os.walk(FfsOutputDir): + for File in Files: + if File.lower().endswith('.ffs') or File.lower().endswith(= '.offset') or File.lower().endswith('.raw') \ + or File.lower().endswith('.raw.txt'): + retVal.add(File) + return retVal =20 ## Create AsBuilt INF file the module @@ -1652,13 +1660,16 @@ class ModuleAutoGen(AutoGen): for File in self.OutputFile: File =3D str(File) if not os.path.isabs(File): - File =3D os.path.join(self.OutputDir, File) + NewFile =3D os.path.join(self.OutputDir, File) + if not os.path.exists(NewFile): + NewFile =3D os.path.join(self.FfsOutputDir, File) + File =3D NewFile if os.path.exists(File): - sub_dir =3D os.path.relpath(File, self.OutputDir) - destination_file =3D os.path.join(FileDir, sub_dir) - destination_dir =3D os.path.dirname(destination_file) - CreateDirectory(destination_dir) - CopyFileOnChange(File, destination_dir) + if File.lower().endswith('.ffs') or File.lower().endswith(= '.offset') or File.lower().endswith('.raw') \ + or File.lower().endswith('.raw.txt'): + self.CacheCopyFile(FfsDir, self.FfsOutputDir, File) + else: + self.CacheCopyFile(FileDir, self.OutputDir, File) =20 def SaveHashChainFileToCache(self, gDict): if not GlobalData.gBinCacheDest: --=20 2.17.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 (#45638): https://edk2.groups.io/g/devel/message/45638 Mute This Topic: https://groups.io/mt/32867360/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-