From 89a69d4b643803d0b52945ca0620376e79f51ed7 Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Fri, 13 Jul 2018 18:18:35 +0800 Subject: BaseTools: Move FindExtendTool to GenFdsGlobalVariable.py Importing "FindExtendTool" from GenFds.GenFds could create the following circular imports: * GenFds.FdfParser => GenFds.Capsule => GenFds.GenFds => GenFds.FdfParser * GenFds.FdfParser => GenFds.Fd => GenFds.Fv => GenFds.AprioriSection => GenFds.FfsFileStatement => GenFds.GuidSection => GenFds.GenFds => GenFds.FdfParser This commit moves "FindExtendTool" to GenFdsGlobalVariable.py to break the circles. Besides, FindExtendTool is tweaked slightly with the following changes: ToolDefClassObject.ToolDefDict => ToolDefDict TAB_GUID => DataType.TAB_GUID TAB_TOD_DEFINES_TARGET => DataType.TAB_TOD_DEFINES_TARGET TAB_TOD_DEFINES_TOOL_CHAIN_TAG => DataType.TAB_TOD_DEFINES_TOOL_CHAIN_TAG TAB_TOD_DEFINES_TARGET_ARCH => DataType.TAB_TOD_DEFINES_TARGET_ARCH Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu Cc: Liming Gao Signed-off-by: Gary Lin Reviewed-by: Jaben Carsey --- BaseTools/Source/Python/GenFds/GuidSection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/GenFds/GuidSection.py') diff --git a/BaseTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds/GuidSection.py index e41c2fd31e..fd660737f4 100644 --- a/BaseTools/Source/Python/GenFds/GuidSection.py +++ b/BaseTools/Source/Python/GenFds/GuidSection.py @@ -22,6 +22,7 @@ import subprocess from .Ffs import Ffs import Common.LongFilePathOs as os from .GenFdsGlobalVariable import GenFdsGlobalVariable +from .GenFdsGlobalVariable import FindExtendTool from CommonDataClass.FdfClass import GuidSectionClassObject from Common import ToolDefClassObject import sys @@ -131,7 +132,6 @@ class GuidSection(GuidSectionClassObject) : ExternalTool = None ExternalOption = None if self.NameGuid is not None: - from .GenFds import FindExtendTool ExternalTool, ExternalOption = FindExtendTool(self.KeyStringList, self.CurrentArchList, self.NameGuid) # -- cgit v1.2.3