summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorJaben Carsey <jaben.carsey@intel.com>2018-06-28 00:10:40 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-06-29 15:39:28 +0800
commitb420d9850282ebbcb452ce24ac42f27802fa0c70 (patch)
treea6ba162fc58dd682d841bba5a2374b3d940ffe50 /BaseTools/Source
parent7c12d613ba78d2b5ab781a91bbb011304ffab705 (diff)
downloadedk2-b420d9850282ebbcb452ce24ac42f27802fa0c70.tar.gz
edk2-b420d9850282ebbcb452ce24ac42f27802fa0c70.tar.bz2
edk2-b420d9850282ebbcb452ce24ac42f27802fa0c70.zip
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> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index c8009d04d7..6d76afd81a 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3202,14 +3202,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], " \