From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: steven.shi@intel.com) Received: from mga12.intel.com (mga12.intel.com []) by groups.io with SMTP; Mon, 10 Jun 2019 23:33:31 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jun 2019 23:33:31 -0700 X-ExtLoop1: 1 Received: from jshi19-mobl.ccr.corp.intel.com ([10.239.197.120]) by fmsmga005.fm.intel.com with ESMTP; 10 Jun 2019 23:33:30 -0700 From: "Steven Shi" To: devel@edk2.groups.io Cc: liming.gao@intel.com, bob.c.feng@intel.com, christian.rodriguez@intel.com, zhijux.fan@intel.com Subject: [PATCH v2 1/1] BaseTools:Build cache cannot store the cache files for library package Date: Tue, 11 Jun 2019 14:33:16 +0800 Message-Id: <20190611063316.16284-2-steven.shi@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190611063316.16284-1-steven.shi@intel.com> References: <20190611063316.16284-1-steven.shi@intel.com> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1867 Current build cache cannot store the cache for library package. build -p MdePkg\MdePkg.dsc -a IA32 -b DEBUG -t VS2015x86 --hash --binary-destination=BinCache After build, the expected result is the BinCache folder is generated and the MdePkg build cache files (e.g. .hash and .lib) are stored in the BinCache folder. But the BinCache folder is not generated at all. This patch is going to fix that issue. Cc: Liming Gao Cc: Bob Feng Cc: Zhiju.Fan Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/AutoGen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 3f41fbb507..f59a8038d5 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3569,8 +3569,11 @@ class ModuleAutoGen(AutoGen): if self.IsAsBuiltInfCreated: return - # Skip the following code for libraries + # Skip INF file generation for libraries if self.IsLibrary: + # Only store the library cache if needed + if GlobalData.gBinCacheDest: + self.CopyModuleToCache() return # Skip the following code for modules with no source files -- 2.17.1.windows.2