From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: steven.shi@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Wed, 08 May 2019 22:00:16 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 22:00:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,448,1549958400"; d="scan'208";a="169856953" Received: from jshi19-mobl.ccr.corp.intel.com ([10.249.170.209]) by fmsmga002.fm.intel.com with ESMTP; 08 May 2019 22:00:14 -0700 From: "Steven Shi" To: devel@edk2.groups.io Cc: bob.c.feng@intel.com, liming.gao@intel.com, christian.rodriguez@intel.com, michael.johnson@intel.com Subject: [PATCH] BaseTools: Skip .mcb file module in Binary Cache Date: Thu, 9 May 2019 12:59:57 +0800 Message-Id: <20190509045957.592-1-steven.shi@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1723 Current Kabylake open platform will build fail if enabled to consume the binary cache, because the binary cache doesn't support to recovery the .mcb microcode file, e.g. m80406E8_00000026.mcb, in a platform level folder which is outside of the module output folder. In normal build without cache, the .mcb file is copied through OS copy/move commands defined in build rules which are not supported by Binary Cache. Change the Binary Cache to skip the .mcb file type module and always rebuild the module to apply the full build rules if it contains .mcb file. --- BaseTools/Source/Python/AutoGen/AutoGen.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 31721a6f9f..6b596c8a65 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3925,9 +3925,9 @@ class ModuleAutoGen(AutoGen): # If library or Module is binary do not skip by hash if self.IsBinaryModule: return False - # .inc is contains binary information so do not skip by hash as well + # .inc and .mcb is contains binary information so do not skip by hash as well for f_ext in self.SourceFileList: - if '.inc' in str(f_ext): + if '.inc' in str(f_ext) or '.mcb' in str(f_ext): return False 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') @@ -4138,9 +4138,9 @@ class ModuleAutoGen(AutoGen): # If library or Module is binary do not skip by hash if self.IsBinaryModule: return False - # .inc is contains binary information so do not skip by hash as well + # .inc or '.mcb' is contains binary information so do not skip by hash as well for f_ext in self.SourceFileList: - if '.inc' in str(f_ext): + if '.inc' in str(f_ext) or '.mcb' in str(f_ext): return False if GlobalData.gUseHashCache: # If there is a valid hash or function generated a valid hash; function will return False -- 2.17.1.windows.2