diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-04-13 16:02:02 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-08-09 23:15:51 +0800 |
commit | db01c8e3d87305a406286e972f19b00c5c6960ab (patch) | |
tree | 68b75b18c650656b3e5c7204be1e8b7e6f666d63 /BaseTools/Source/Python/GenFds/GenFds.py | |
parent | 4b1b7c1913092d73d689d8086dcfa579c0217dc8 (diff) | |
download | edk2-db01c8e3d87305a406286e972f19b00c5c6960ab.tar.gz edk2-db01c8e3d87305a406286e972f19b00c5c6960ab.tar.bz2 edk2-db01c8e3d87305a406286e972f19b00c5c6960ab.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/GenFds.py')
-rw-r--r-- | BaseTools/Source/Python/GenFds/GenFds.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/GenFds.py index 5888997761..51943411ad 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -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]
|