From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=bob.c.feng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7E6E921962301 for ; Wed, 9 Jan 2019 16:42:48 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2019 16:42:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,459,1539673200"; d="scan'208";a="124827038" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 09 Jan 2019 16:42:47 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 9 Jan 2019 16:42:47 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 9 Jan 2019 16:42:47 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.159]) with mapi id 14.03.0415.000; Thu, 10 Jan 2019 08:42:44 +0800 From: "Feng, Bob C" To: "Carsey, Jaben" , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [v2 1/1] BaseTools: fix imports Thread-Index: AQHUqE2sF/bvG15mJkKq974c/WqNoaWnqh+Q Date: Thu, 10 Jan 2019 00:42:44 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D16005446E@SHSMSX101.ccr.corp.intel.com> References: <987b3d1476eecedf1a32edda7fc15b58bf4711b6.1547060381.git.jaben.carsey@intel.com> In-Reply-To: <987b3d1476eecedf1a32edda7fc15b58bf4711b6.1547060381.git.jaben.carsey@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [v2 1/1] BaseTools: fix imports X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2019 00:42:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Bob Feng =20 -----Original Message----- From: Carsey, Jaben=20 Sent: Thursday, January 10, 2019 3:01 AM To: edk2-devel@lists.01.org Cc: Feng, Bob C ; Gao, Liming Subject: [v2 1/1] BaseTools: fix imports 1 - Some of these imports are cascaded from another file. Import them local= ly. 2 - Some of these imports are not used. Remove them. 3 - Some of these were missing the namespace used to import them. These changes facilitate optimization of BaseTools: https://bugzilla.tianocore.org/show_bug.cgi?id=3D42 Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey --- BaseTools/Source/Python/AutoGen/AutoGen.py | 6 ++---= - BaseTools/Source/Python/AutoGen/GenC.py | 2 +- BaseTools/Source/Python/AutoGen/GenPcdDb.py | 3 +++ BaseTools/Source/Python/Common/RangeExpression.py | 3 ++- BaseTools/Source/Python/Common/ToolDefClassObject.py | 4 ++-- BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py | 4 ++-- BaseTools/Source/Python/GenFds/FdfParser.py | 4 ++-- BaseTools/Source/Python/GenFds/FfsInfStatement.py | 3 ++- BaseTools/Source/Python/GenFds/GenFds.py | 2 +- BaseTools/Source/Python/GenFds/GuidSection.py | 1 - BaseTools/Source/Python/Workspace/DecBuildData.py | 9 +++++= +--- BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- BaseTools/Source/Python/Workspace/MetaFileParser.py | 9 +++++= ---- BaseTools/Source/Python/build/build.py | 16 +++++= +++-------- 14 files changed, 38 insertions(+), 32 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index d646cd50ce8e..acd34692b6c2 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1,7 +1,7 @@ ## @file # Generate AutoGen.h, AutoGen.c and *.depex files # -# Copyright (c) 2007= - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights=20 +reserved.
# Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.
# = # This program and the accompanying materials @@ -52,6 +52,7 @@ from .GenV= ar import VariableMgr, var_info from collections import OrderedDict from = collections import defaultdict from Workspace.WorkspaceCommon import Order= edListDict +from Common.ToolDefClassObject import gDefaultToolsDefFile =20 from Common.caching import cached_property, cached_class_function =20 @@ -85,9 +86,6 @@ gMakeTypeMap =3D {TAB_COMPILER_MSFT:"nmake", "GCC":"gmake= "} ## Build rule configuration file gDefaultBuildRuleFile =3D 'build_rule= .txt' =20 -## Tools definition configuration file -gDefaultToolsDefFile =3D 'tools_def.txt' - ## Build rule default version AutoGenReqBuildRuleVerNum =3D "0.1" =20 diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Pyt= hon/AutoGen/GenC.py index 09626d0b9610..e224568db1ed 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -18,7 +18,7 @@ import string import collections import struct from Common import EdkLogger - +from Common import GlobalData from Common.BuildToolError import * from Common.DataType import * from Common.Misc import * diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source= /Python/AutoGen/GenPcdDb.py index 876fcf1efb8a..a9068d2d7a86 100644 --- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py +++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py @@ -22,6 +22,9 @@ from Common.VariableAttributes import VariableAttributes = import copy from struct import unpack from Common.DataType import * +from Common import GlobalData +from Common import EdkLogger +import Common.LongFilePathOs as os =20 DATABASE_VERSION =3D 7 =20 diff --git a/BaseTools/Source/Python/Common/RangeExpression.py b/BaseTools/= Source/Python/Common/RangeExpression.py index 407dc06ccf0b..40958451d286 100644 --- a/BaseTools/Source/Python/Common/RangeExpression.py +++ b/BaseTools/Source/Python/Common/RangeExpression.py @@ -19,6 +19,7 @@ from CommonDataClass.Exceptions import WrnExpression imp= ort uuid from Common.Expression import PcdPattern, BaseExpression from Co= mmon.DataType import * +from re import compile =20 ERR_STRING_EXPR =3D 'This operator cannot be used in string expression: [%= s].' ERR_SNYTAX =3D 'Syntax error, the rest of expression cannot be evaluated: = [%s].' @@ -202,7 +203,7 @@ class RangeExpression(BaseExpression): =20 NonLetterOpLst =3D ['+', '-', '&', '|', '^', '!', '=3D', '>', '<'] =20 - RangePattern =3D re.compile(r'[0-9]+ - [0-9]+') + RangePattern =3D compile(r'[0-9]+ - [0-9]+') =20 def preProcessRangeExpr(self, expr): # convert hex to int diff --git a/BaseTools/Source/Python/Common/ToolDefClassObject.py b/BaseToo= ls/Source/Python/Common/ToolDefClassObject.py index 186d279840c1..0a78123e2c4b 100644 --- a/BaseTools/Source/Python/Common/ToolDefClassObject.py +++ b/BaseTools/Source/Python/Common/ToolDefClassObject.py @@ -1,7 +1,7 @@ ## @file # This file is used to define each component of tools_def.txt file # -# C= opyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights=20 +reserved.
# This program and the accompanying materials # are licensed and made ava= ilable under the terms and conditions of the BSD License # which accompani= es this distribution. The full text of the license may be found at @@ -20,= 7 +20,7 @@ import re from . import EdkLogger =20 from .BuildToolError import * -from .TargetTxtClassObject import * +from Common.TargetTxtClassObject import TargetTxtDict from Common.LongFilePathSupport import OpenLongFilePath as open from Comm= on.Misc import PathClass from Common.StringUtils import NormPath diff --gi= t a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py b/BaseT= ools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py index 52a78bcbb813..283789fd1ddd 100644 --- a/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Ecc/MetaFileWorkspace/MetaFileParser.py @@ -40,7 +40,7 @@ from Common.LongFilePathSupport import CodecOpenLongFileP= ath ## A decorator used to parse macro definition def ParseMacro(Parser): def MacroParser(self): - Match =3D gMacroDefPattern.match(self._CurrentLine) + Match =3D GlobalData.gMacroDefPattern.match(self._CurrentLine) if not Match: # Not 'DEFINE/EDK_GLOBAL' statement, call decorated method Parser(self) @@ -61,7 +61,7 @@ def ParseMacro(Parser): EdkLogger.error('Parser', FORMAT_INVALID, "%s can only be defi= ned via environment variable" % Name, ExtraData=3Dself._CurrentLine, File=3Dself.Met= aFile, Line=3Dself._LineIndex+1) # Only upper case letters, digit and '_' are allowed - if not gMacroNamePattern.match(Name): + if not GlobalData.gMacroNamePattern.match(Name): EdkLogger.error('Parser', FORMAT_INVALID, "The macro name must= be in the pattern [A-Z][A-Z0-9_]*", ExtraData=3Dself._CurrentLine, File=3Dself.Met= aFile, Line=3Dself._LineIndex+1) =20 diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source= /Python/GenFds/FdfParser.py index de0b166030e7..d54e4bd0313f 100644 --- a/BaseTools/Source/Python/GenFds/FdfParser.py +++ b/BaseTools/Source/Python/GenFds/FdfParser.py @@ -1101,7 +1101,7 @@ class FdfParser: def _GetNextGuid(self): if not self._GetNextToken(): return False - if gGuidPattern.match(self._Token) is not None: + if GlobalData.gGuidPattern.match(self._Token) is not None: return True else: self._UndoToken() @@ -1169,7 +1169,7 @@ class FdfParser: def _GetNextHexNumber(self): if not self._GetNextToken(): return False - if gHexPatternAll.match(self._Token): + if GlobalData.gHexPatternAll.match(self._Token): return True else: self._UndoToken() diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/= Source/Python/GenFds/FfsInfStatement.py index d4c61c074963..4dda3cf787e1 100644 --- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py +++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py @@ -30,6 +30,7 @@ from . import RuleSimpleFile from . import RuleComplexFi= le from CommonDataClass.FdfClass import FfsInfStatementClassObject from C= ommon.MultipleWorkspace import MultipleWorkspace as mws +from Common.DataType import SUP_MODULE_USER_DEFINED from Common.StringUtils import * from Common.Misc import PathClass from Common.Misc import GuidStructureByteArrayToGuidString @@ -94,7 +95,7 @@ class FfsInfStatement(FfsInfStatementClassObject): ModuleType =3D self.InfModule.ModuleType PlatformDataBase =3D GenFdsGlobalVariable.WorkSpace.BuildO= bject[GenFdsGlobalVariable.ActivePlatform, self.CurrentArch, GenFdsGlobalVa= riable.TargetName, GenFdsGlobalVariable.ToolChainTag] =20 - if ModuleType !=3D DataType.SUP_MODULE_USER_DEFINED: + if ModuleType !=3D SUP_MODULE_USER_DEFINED: for LibraryClass in PlatformDataBase.LibraryClasses.Ge= tKeys(): if LibraryClass.startswith("NULL") and PlatformDat= aBase.LibraryClasses[LibraryClass, ModuleType]: self.InfModule.LibraryClasses[LibraryClass] = =3D PlatformDataBase.LibraryClasses[LibraryClass, ModuleType] diff --git a/= BaseTools/Source/Python/GenFds/GenFds.py b/BaseTools/Source/Python/GenFds/G= enFds.py index 447aa7f5ebc2..d32325e89433 100644 --- a/BaseTools/Source/Python/GenFds/GenFds.py +++ b/BaseTools/Source/Python/GenFds/GenFds.py @@ -1,7 +1,7 @@ ## @file # generate flash image # -# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights=20 +reserved.
# # This program and the accompanying materials # are licensed and made a= vailable under the terms and conditions of the BSD License diff --git a/Bas= eTools/Source/Python/GenFds/GuidSection.py b/BaseTools/Source/Python/GenFds= /GuidSection.py index 25609e6f2ae1..52b97300ecac 100644 --- a/BaseTools/Source/Python/GenFds/GuidSection.py +++ b/BaseTools/Source/Python/GenFds/GuidSection.py @@ -24,7 +24,6 @@ import Common.LongFilePathOs as os from .GenFdsGlobalVar= iable import GenFdsGlobalVariable from .GenFdsGlobalVariable import FindEx= tendTool from CommonDataClass.FdfClass import GuidSectionClassObject -from= Common import ToolDefClassObject import sys from Common import EdkLogger= from Common.BuildToolError import * diff --git a/BaseTools/Source/Python/= Workspace/DecBuildData.py b/BaseTools/Source/Python/Workspace/DecBuildData.= py index cc00409fee01..13b653bd9872 100644 --- a/BaseTools/Source/Python/Workspace/DecBuildData.py +++ b/BaseTools/Source/Python/Workspace/DecBuildData.py @@ -16,8 +16,10 @@ from Common.DataType import * from Common.Misc import *= from types import * from collections import OrderedDict - +from CommonDataClass.DataClass import * from Workspace.BuildClassObject import PackageBuildClassObject, StructureP= cd, PcdClassObject +from Common.GlobalData import gGlobalDefines, gEcpSource from re import=20 +compile =20 ## Platform build information from DEC file # @@ -109,7 +111,7 @@ class D= ecBuildData(PackageBuildClassObject): @property def _Macros(self): if self._MacroDict is None: - self._MacroDict =3D dict(GlobalData.gGlobalDefines) + self._MacroDict =3D dict(gGlobalDefines) return self._MacroDict =20 ## Get architecture @@ -298,7 +300,7 @@ class DecBuildData(PackageBuildClassObject): PublicInclues =3D [] RecordList =3D self._RawData[MODEL_EFI_INCLUDE, self._Arch] Macros =3D self._Macros - Macros["EDK_SOURCE"] =3D GlobalData.gEcpSource + Macros["EDK_SOURCE"] =3D gEcpSource for Record in RecordList: File =3D PathClass(NormPath(Record[0], Macros), self._Pack= ageDir, Arch=3Dself._Arch) LineNo =3D Record[-1] @@ -464,6 +466,7 @@ class DecBuildData(PackageBuildClassObject): StructurePcds =3D self.ProcessStructurePcd(StrPcdSet) for pcd in StructurePcds: Pcds[pcd.TokenCName, pcd.TokenSpaceGuidCName, self._PCD_TYPE_S= TRING_[Type]] =3D pcd + StructPattern =3D compile(r'[_a-zA-Z][0-9A-Za-z_]*$') for pcd in Pcds.values(): if pcd.DatumType not in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TA= B_UINT64, TAB_VOID, "BOOLEAN"]: if not pcd.IsAggregateDatumType(): diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/= Source/Python/Workspace/DscBuildData.py index 7e82e8e934ab..3b0b23ca8fcb 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -25,8 +25,8 @@ from Common.Misc import * from types import * from Comm= on.Expression import * from CommonDataClass.CommonClass import SkuInfoClas= s -from Common.TargetTxtClassObject import * -from Common.ToolDefClassObjec= t import * +from Common.TargetTxtClassObject import TargetTxtClassObject from=20 +Common.ToolDefClassObject import ToolDefClassObject from .MetaDataTable import * from .MetaFileTable import * from .MetaFileParser import * diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTool= s/Source/Python/Workspace/MetaFileParser.py index 032220813b41..02c8d7bbb58c 100644 --- a/BaseTools/Source/Python/Workspace/MetaFileParser.py +++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py @@ -36,6 +36,7 @@ from Common.LongFilePathSupport import OpenLongFilePath a= s open from collections import defaultdict from .MetaFileTable import Met= aFileStorage from .MetaFileCommentParser import CheckInfComment +from Common.DataType import TAB_COMMENT_EDK_START, TAB_COMMENT_EDK_END =20 ## RegEx for finding file versions hexVersionPattern =3D re.compile(r'0[xX][\da-f-A-F]{5,8}') @@ -45,7 +46,7 @@ CODEPattern =3D re.compile(r"{CODE\([a-fA-F0-9Xx\{\},\s]*= \)}") ## A decorator used to parse macro definition def ParseMacro(Parser): def MacroParser(self): - Match =3D gMacroDefPattern.match(self._CurrentLine) + Match =3D GlobalData.gMacroDefPattern.match(self._CurrentLine) if not Match: # Not 'DEFINE/EDK_GLOBAL' statement, call decorated method Parser(self) @@ -66,7 +67,7 @@ def ParseMacro(Parser): EdkLogger.error('Parser', FORMAT_INVALID, "%s can only be defi= ned via environment variable" % Name, ExtraData=3Dself._CurrentLine, File=3Dself.Met= aFile, Line=3Dself._LineIndex + 1) # Only upper case letters, digit and '_' are allowed - if not gMacroNamePattern.match(Name): + if not GlobalData.gMacroNamePattern.match(Name): EdkLogger.error('Parser', FORMAT_INVALID, "The macro name must= be in the pattern [A-Z][A-Z0-9_]*", ExtraData=3Dself._CurrentLine, File=3Dself.Met= aFile, Line=3Dself._LineIndex + 1) =20 @@ -562,10 +563,10 @@ class InfParser(MetaFileParser): SectionComments.extend(Comments) Comments =3D [] continue - if Line.find(DataType.TAB_COMMENT_EDK_START) > -1: + if Line.find(TAB_COMMENT_EDK_START) > -1: IsFindBlockComment =3D True continue - if Line.find(DataType.TAB_COMMENT_EDK_END) > -1: + if Line.find(TAB_COMMENT_EDK_END) > -1: IsFindBlockComment =3D False continue if IsFindBlockComment: diff --git a/BaseTools/Source/Python/build/build.py b/BaseTools/Source/Pyth= on/build/build.py index 97271e634e6c..b992a4c1b303 100644 --- a/BaseTools/Source/Python/build/build.py +++ b/BaseTools/Source/Python/build/build.py @@ -37,8 +37,8 @@ from subprocess import * from Common import Misc as Util= s =20 from Common.LongFilePathSupport import OpenLongFilePath as open -from Comm= on.TargetTxtClassObject import * -from Common.ToolDefClassObject import * +from Common.TargetTxtClassObject import TargetTxtClassObject from=20 +Common.ToolDefClassObject import ToolDefClassObject from Common.DataType import * from Common.BuildVersion import gBUILD_VERSION from AutoGen.AutoGen impor= t * @@ -884,7 +884,7 @@ class Build(): if os.path.isfile(BuildConfigurationFile) =3D=3D True: StatusCode =3D self.TargetTxt.LoadTargetTxtFile(BuildConfigura= tionFile) =20 - ToolDefinitionFile =3D self.TargetTxt.TargetTxtDictionary[Data= Type.TAB_TAT_DEFINES_TOOL_CHAIN_CONF] + ToolDefinitionFile =3D=20 + self.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_TOOL_CHAIN_CONF] if ToolDefinitionFile =3D=3D '': ToolDefinitionFile =3D gToolsDefinition ToolDefinitionFile =3D os.path.normpath(mws.join(self.Work= spaceDir, 'Conf', ToolDefinitionFile)) @@ -897,16 +897,16 @@ class Build(): =20 # if no ARCH given in command line, get it from target.txt if not self.ArchList: - self.ArchList =3D self.TargetTxt.TargetTxtDictionary[DataType.= TAB_TAT_DEFINES_TARGET_ARCH] + self.ArchList =3D=20 + self.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_TARGET_ARCH] self.ArchList =3D tuple(self.ArchList) =20 # if no build target given in command line, get it from target.txt if not self.BuildTargetList: - self.BuildTargetList =3D self.TargetTxt.TargetTxtDictionary[Da= taType.TAB_TAT_DEFINES_TARGET] + self.BuildTargetList =3D=20 + self.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_TARGET] =20 # if no tool chain given in command line, get it from target.txt if not self.ToolChainList: - self.ToolChainList =3D self.TargetTxt.TargetTxtDictionary[Data= Type.TAB_TAT_DEFINES_TOOL_CHAIN_TAG] + self.ToolChainList =3D=20 + self.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_TOOL_CHAIN_TAG] if self.ToolChainList is None or len(self.ToolChainList) =3D= =3D 0: EdkLogger.error("build", RESOURCE_NOT_AVAILABLE, ExtraData= =3D"No toolchain given. Don't know how to build.\n") =20 @@ -936,7 +936,7 @@ class Build(): self.ToolChainFamily =3D ToolChainFamily =20 if self.ThreadNumber is None: - self.ThreadNumber =3D self.TargetTxt.TargetTxtDictionary[DataT= ype.TAB_TAT_DEFINES_MAX_CONCURRENT_THREAD_NUMBER] + self.ThreadNumber =3D=20 + self.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_MAX_CONCURRENT_THRE + AD_NUMBER] if self.ThreadNumber =3D=3D '': self.ThreadNumber =3D 0 else: @@ -949,7 +949,7 @@ class Build(): self.ThreadNumber =3D 1 =20 if not self.PlatformFile: - PlatformFile =3D self.TargetTxt.TargetTxtDictionary[DataType.T= AB_TAT_DEFINES_ACTIVE_PLATFORM] + PlatformFile =3D=20 + self.TargetTxt.TargetTxtDictionary[TAB_TAT_DEFINES_ACTIVE_PLATFORM] if not PlatformFile: # Try to find one in current directory WorkingDirectory =3D os.getcwd() -- 2.16.2.windows.1