From: "Bob Feng" <bob.c.feng@intel.com>
To: devel@edk2.groups.io
Cc: Liming Gao <gaoliming@byosoft.com.cn>, Yuwei Chen <yuwei.chen@intel.com>
Subject: [Patch] BaseTools: Remove the dependency on the build intermediate file
Date: Mon, 26 Oct 2020 20:27:44 +0800 [thread overview]
Message-ID: <20201026122744.45096-1-bob.c.feng@intel.com> (raw)
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 <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
---
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
next reply other threads:[~2020-10-26 12:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 12:27 Bob Feng [this message]
2020-11-02 1:32 ` 回复: [Patch] BaseTools: Remove the dependency on the build intermediate file gaoliming
2020-11-02 9:57 ` Bob Feng
2020-11-04 0:52 ` 回复: " gaoliming
2020-11-04 11:33 ` [edk2-devel] " Bob Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201026122744.45096-1-bob.c.feng@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox