From db01c8e3d87305a406286e972f19b00c5c6960ab Mon Sep 17 00:00:00 2001 From: "Feng, Bob C" Date: Sat, 13 Apr 2019 16:02:02 +0800 Subject: 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 Signed-off-by: Bob Feng Acked-by: Laszlo Ersek Tested-by: Laszlo Ersek Acked-by: Liming Gao --- BaseTools/Source/Python/Common/TargetTxtClassObject.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'BaseTools/Source/Python/Common/TargetTxtClassObject.py') diff --git a/BaseTools/Source/Python/Common/TargetTxtClassObject.py b/BaseTools/Source/Python/Common/TargetTxtClassObject.py index 9d7673b41b..79a5acc010 100644 --- a/BaseTools/Source/Python/Common/TargetTxtClassObject.py +++ b/BaseTools/Source/Python/Common/TargetTxtClassObject.py @@ -146,6 +146,8 @@ def TargetTxtDict(ConfDir): Target.LoadTargetTxtFile(os.path.normpath(os.path.join(ConfDir, gDefaultTargetTxtFile))) return Target +TargetTxt = TargetTxtDict(os.path.join(os.getenv("WORKSPACE"),"Conf")) + ## # # This acts like the main() function for the script, unless it is 'import'ed into another -- cgit v1.2.3