BaseTools: Support build options for specific module type in DSC.
This patch extended BuildOptions section in DSC to support [BuildOptions.ARCH.CodeBase.MODULE_TYPE] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yingke Liu <yingke.d.liu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17621 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -147,6 +147,7 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
self._Pcds = None
|
||||
self._DecPcds = None
|
||||
self._BuildOptions = None
|
||||
self._ModuleTypeOptions = None
|
||||
self._LoadFixAddress = None
|
||||
self._RFCLanguages = None
|
||||
self._ISOLanguages = None
|
||||
@ -767,6 +768,19 @@ class DscBuildData(PlatformBuildClassObject):
|
||||
self._BuildOptions[ToolChainFamily, ToolChain, EDK_NAME] = Option
|
||||
return self._BuildOptions
|
||||
|
||||
def GetBuildOptionsByModuleType(self, Edk, ModuleType):
|
||||
if self._ModuleTypeOptions == None:
|
||||
self._ModuleTypeOptions = sdict()
|
||||
if (Edk, ModuleType) not in self._ModuleTypeOptions:
|
||||
options = sdict()
|
||||
self._ModuleTypeOptions[Edk, ModuleType] = options
|
||||
DriverType = '%s.%s' % (Edk, ModuleType)
|
||||
RecordList = self._RawData[MODEL_META_DATA_BUILD_OPTION, self._Arch, DriverType]
|
||||
for ToolChainFamily, ToolChain, Option, Arch, Type, Dummy3, Dummy4 in RecordList:
|
||||
if Arch == self._Arch and Type == DriverType:
|
||||
options[ToolChainFamily, ToolChain, Edk] = Option
|
||||
return self._ModuleTypeOptions[Edk, ModuleType]
|
||||
|
||||
## Retrieve non-dynamic PCD settings
|
||||
#
|
||||
# @param Type PCD type
|
||||
|
Reference in New Issue
Block a user