* [PATCH v1 1/1] BaseTools: AutoGen - move constructor out of loop [not found] <cover.1530115821.git.jaben.carsey@intel.com> @ 2018-06-27 16:10 ` Jaben Carsey 2018-06-29 7:37 ` Zhu, Yonghong 0 siblings, 1 reply; 2+ messages in thread From: Jaben Carsey @ 2018-06-27 16:10 UTC (permalink / raw) To: edk2-devel; +Cc: Liming Gao, Yonghong Zhu Create the 2 comparison objects once outside the loop. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index ed0be3bc74f9..6f86185b413d 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3201,14 +3201,16 @@ class ModuleAutoGen(AutoGen): def _GetSourceFileList(self): if self._SourceFileList is None: self._SourceFileList = [] + ToolChainTagSet = {"", "*", self.ToolChain} + ToolChainFamilySet = {"", "*", self.ToolChainFamily, self.BuildRuleFamily} for F in self.Module.Sources: # match tool chain - if F.TagName not in ("", "*", self.ToolChain): + if F.TagName not in ToolChainTagSet: EdkLogger.debug(EdkLogger.DEBUG_9, "The toolchain [%s] for processing file [%s] is found, " "but [%s] is needed" % (F.TagName, str(F), self.ToolChain)) continue # match tool chain family or build rule family - if F.ToolChainFamily not in ("", "*", self.ToolChainFamily, self.BuildRuleFamily): + if F.ToolChainFamily not in ToolChainFamilySet: EdkLogger.debug( EdkLogger.DEBUG_0, "The file [%s] must be built by tools of [%s], " \ -- 2.16.2.windows.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] BaseTools: AutoGen - move constructor out of loop 2018-06-27 16:10 ` [PATCH v1 1/1] BaseTools: AutoGen - move constructor out of loop Jaben Carsey @ 2018-06-29 7:37 ` Zhu, Yonghong 0 siblings, 0 replies; 2+ messages in thread From: Zhu, Yonghong @ 2018-06-29 7:37 UTC (permalink / raw) To: Carsey, Jaben, edk2-devel@lists.01.org; +Cc: Gao, Liming, Zhu, Yonghong Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Best Regards, Zhu Yonghong -----Original Message----- From: Carsey, Jaben Sent: Thursday, June 28, 2018 12:11 AM To: edk2-devel@lists.01.org Cc: Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com> Subject: [PATCH v1 1/1] BaseTools: AutoGen - move constructor out of loop Create the 2 comparison objects once outside the loop. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> --- BaseTools/Source/Python/AutoGen/AutoGen.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index ed0be3bc74f9..6f86185b413d 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -3201,14 +3201,16 @@ class ModuleAutoGen(AutoGen): def _GetSourceFileList(self): if self._SourceFileList is None: self._SourceFileList = [] + ToolChainTagSet = {"", "*", self.ToolChain} + ToolChainFamilySet = {"", "*", self.ToolChainFamily, self.BuildRuleFamily} for F in self.Module.Sources: # match tool chain - if F.TagName not in ("", "*", self.ToolChain): + if F.TagName not in ToolChainTagSet: EdkLogger.debug(EdkLogger.DEBUG_9, "The toolchain [%s] for processing file [%s] is found, " "but [%s] is needed" % (F.TagName, str(F), self.ToolChain)) continue # match tool chain family or build rule family - if F.ToolChainFamily not in ("", "*", self.ToolChainFamily, self.BuildRuleFamily): + if F.ToolChainFamily not in ToolChainFamilySet: EdkLogger.debug( EdkLogger.DEBUG_0, "The file [%s] must be built by tools of [%s], " \ -- 2.16.2.windows.1 ^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-29 7:37 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <cover.1530115821.git.jaben.carsey@intel.com> 2018-06-27 16:10 ` [PATCH v1 1/1] BaseTools: AutoGen - move constructor out of loop Jaben Carsey 2018-06-29 7:37 ` Zhu, Yonghong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox