From: "Bob Feng" <bob.c.feng@intel.com>
To: devel@edk2.groups.io
Cc: Liming Gao <liming.gao@intel.com>,
Steven Shi <steven.shi@intel.com>,
Christian Rodriguez <christian.rodriguez@intel.com>,
Bob Feng <bob.c.feng@intel.com>
Subject: [Patch 1/2] BaseTools: refine CreateAsBuiltInf function
Date: Mon, 24 Jun 2019 09:51:24 +0800 [thread overview]
Message-ID: <20190624015124.16544-1-bob.c.feng@intel.com> (raw)
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1932
ModuleAutogen.CreateAsBuiltInf IsOnlyCopy parameter
and related function can be moved out of CreateAsBuiltInf,
so that CreateAsBuiltInf is more clean.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Steven Shi <steven.shi@intel.com>
Cc: Christian Rodriguez <christian.rodriguez@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
---
BaseTools/Source/Python/AutoGen/AutoGen.py | 5 +----
BaseTools/Source/Python/build/build.py | 6 ++++--
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index f50941d422..45b81ed660 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3579,15 +3579,12 @@ class ModuleAutoGen(AutoGen):
fInputfile.close ()
return OutputName
## Create AsBuilt INF file the module
#
- def CreateAsBuiltInf(self, IsOnlyCopy = False):
+ def CreateAsBuiltInf(self):
self.OutputFile = set()
- if IsOnlyCopy and GlobalData.gBinCacheDest:
- self.CopyModuleToCache()
- return
if self.IsAsBuiltInfCreated:
return
# Skip INF file generation for libraries
diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Python/build/build.py
index 2dca3c7b34..3ece4d4c61 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -2217,17 +2217,19 @@ class Build():
all_mod_set = set()
for Module in self.BuildModules:
Module.CreateAsBuiltInf()
all_mod_set.add(Module)
for Module in self.HashSkipModules:
- Module.CreateAsBuiltInf(True)
+ if GlobalData.gBinCacheDest:
+ Module.CopyModuleToCache()
all_mod_set.add(Module)
for Module in all_mod_set:
for lib in Module.LibraryAutoGenList:
all_lib_set.add(lib)
for lib in all_lib_set:
- lib.CreateAsBuiltInf(True)
+ if GlobalData.gBinCacheDest:
+ lib.CopyModuleToCache()
all_lib_set.clear()
all_mod_set.clear()
self.BuildModules = []
self.HashSkipModules = []
## Do some clean-up works when error occurred
--
2.20.1.windows.1
next reply other threads:[~2019-06-24 1:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-24 1:51 Bob Feng [this message]
2019-06-24 7:19 ` [Patch 1/2] BaseTools: refine CreateAsBuiltInf function Steven Shi
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=20190624015124.16544-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