diff options
author | Yingke Liu <yingke.d.liu@intel.com> | 2015-06-11 05:16:40 +0000 |
---|---|---|
committer | yingke <yingke@Edk2> | 2015-06-11 05:16:40 +0000 |
commit | 35f69db91be5ccc972e0573015d37715b0aec315 (patch) | |
tree | 6a4496384b3bee2349d4181f4d3cbf318ddbd10c /BaseTools/Source/Python/Workspace | |
parent | 620f289162b08d319fe1e73b3c7e2baff6b388e4 (diff) | |
download | edk2-platforms-35f69db91be5ccc972e0573015d37715b0aec315.tar.xz |
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
Diffstat (limited to 'BaseTools/Source/Python/Workspace')
-rw-r--r-- | BaseTools/Source/Python/Workspace/WorkspaceDatabase.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py index 14cd22d064..1371bb0289 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py @@ -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
|