BaseTools: Create and use a shared value for 'MSFT' from DataType
I see lots of 'MSFT' throughout code and this can reduce them. Cc: Bob Feng <Bob.c.Feng@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
7c7c8190d3
commit
94c0455937
@ -2784,7 +2784,7 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
self.Modules.append(Module)
|
||||
|
||||
def _GetToolChainFamily(self):
|
||||
self._ToolChainFamily = "MSFT"
|
||||
self._ToolChainFamily = TAB_COMPILER_MSFT
|
||||
BuildConfigurationFile = os.path.normpath(os.path.join(GlobalData.gConfDirectory, "target.txt"))
|
||||
if os.path.isfile(BuildConfigurationFile) == True:
|
||||
TargetTxt = TargetTxtClassObject()
|
||||
@ -2800,7 +2800,7 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
if TAB_TOD_DEFINES_FAMILY not in ToolDefinition \
|
||||
or self._Toolchain not in ToolDefinition[TAB_TOD_DEFINES_FAMILY] \
|
||||
or not ToolDefinition[TAB_TOD_DEFINES_FAMILY][self._Toolchain]:
|
||||
self._ToolChainFamily = "MSFT"
|
||||
self._ToolChainFamily = TAB_COMPILER_MSFT
|
||||
else:
|
||||
self._ToolChainFamily = ToolDefinition[TAB_TOD_DEFINES_FAMILY][self._Toolchain]
|
||||
return self._ToolChainFamily
|
||||
|
Reference in New Issue
Block a user