BaseTools: Singleton the object to handle build conf file
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875 The build config files are target.txt, build rule, tooldef During a build, the config is not changed, so the object to handle them need to be singleton. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -20,7 +20,7 @@ from linecache import getlines
|
||||
from io import BytesIO
|
||||
|
||||
import Common.LongFilePathOs as os
|
||||
from Common.TargetTxtClassObject import TargetTxtClassObject
|
||||
from Common.TargetTxtClassObject import TargetTxt
|
||||
from Common.DataType import *
|
||||
import Common.GlobalData as GlobalData
|
||||
from Common import EdkLogger
|
||||
@ -207,8 +207,6 @@ def GenFdsApi(FdsCommandDict, WorkSpaceDataBase=None):
|
||||
GlobalData.gConfDirectory = GenFdsGlobalVariable.ConfDir
|
||||
BuildConfigurationFile = os.path.normpath(os.path.join(ConfDirectoryPath, "target.txt"))
|
||||
if os.path.isfile(BuildConfigurationFile) == True:
|
||||
TargetTxt = TargetTxtClassObject()
|
||||
TargetTxt.LoadTargetTxtFile(BuildConfigurationFile)
|
||||
# if no build target given in command line, get it from target.txt
|
||||
if not GenFdsGlobalVariable.TargetName:
|
||||
BuildTargetList = TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_TARGET]
|
||||
|
Reference in New Issue
Block a user