From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.11776.1603715268519148157 for ; Mon, 26 Oct 2020 05:27:48 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: bob.c.feng@intel.com) IronPort-SDR: weNz5pSWlRPXiKWSGFuPK9Z9vsSB7zrJP+PEr8MlWMOB/W65Ax8L0R8EQeEhZgeKPE9kcW/ejG fRy7R26onV/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9785"; a="232101328" X-IronPort-AV: E=Sophos;i="5.77,419,1596524400"; d="scan'208";a="232101328" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2020 05:27:47 -0700 IronPort-SDR: ZkKxa9pL0/ITdazNkuP/AXYvP/PxVBGtPNwOpsyCUJMvtQFKjt50NJH1NfyfOmF+SCMwDcLbYX Gpyxv6qE427w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,419,1596524400"; d="scan'208";a="322528348" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.66]) by orsmga006.jf.intel.com with ESMTP; 26 Oct 2020 05:27:46 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Yuwei Chen Subject: [Patch] BaseTools: Remove the dependency on the build intermediate file Date: Mon, 26 Oct 2020 20:27:44 +0800 Message-Id: <20201026122744.45096-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When generating compressed section, the build tool rely on the build intermediate files, which were generated in last build, to get the file list. This method will cause the incremental build to generate incorrect build result. To reproduce this incremental build error, you can do: 1. build Ovmf 2. change the module OvmfPkg\AcpiTables a source file Facp.aslc name from Facp.aslc to Facpxxx.aslc. 3. change the Facp.aslc file name in [sources] section of AcpiTables.inf 4. incremental build Ovmf you will see the in AcpiTables module Makefile, the corresponding Facp.acpi file is not changed. This patch is to make the build always get file list from the INF. Signed-off-by: Bob Feng Cc: Liming Gao Cc: Yuwei Chen --- BaseTools/Source/Python/GenFds/Section.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/BaseTools/Source/Python/GenFds/Section.py b/BaseTools/Source/Python/GenFds/Section.py index 2acb70f412..0382b2a759 100644 --- a/BaseTools/Source/Python/GenFds/Section.py +++ b/BaseTools/Source/Python/GenFds/Section.py @@ -139,25 +139,10 @@ class Section (SectionClassObject): if File.Ext == Suffix: FileList.append(File.Path) if (not IsMakefile and Suffix is not None and os.path.exists(FfsInf.EfiOutputPath)) or (IsMakefile and Suffix is not None): - # - # Get Makefile path and time stamp - # - MakefileDir = FfsInf.EfiOutputPath[:-len('OUTPUT')] - Makefile = os.path.join(MakefileDir, 'Makefile') - if not os.path.exists(Makefile): - Makefile = os.path.join(MakefileDir, 'GNUmakefile') - if os.path.exists(Makefile): - # Update to search files with suffix in all sub-dirs. - Tuple = os.walk(FfsInf.EfiOutputPath) - for Dirpath, Dirnames, Filenames in Tuple: - for F in Filenames: - if os.path.splitext(F)[1] == Suffix: - FullName = os.path.join(Dirpath, F) - if os.path.getmtime(FullName) > os.path.getmtime(Makefile): - FileList.append(FullName) if not FileList: SuffixMap = FfsInf.GetFinalTargetSuffixMap() if Suffix in SuffixMap: FileList.extend(SuffixMap[Suffix]) -- 2.20.1.windows.1