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/AutoGen | |
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/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index d1ed0a65ab..a2a8e7e5a3 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2074,8 +2074,11 @@ class PlatformAutoGen(AutoGen): # Get the different options for the different style module
if Module.AutoGenVersion < 0x00010005:
PlatformOptions = self.EdkBuildOption
+ ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDK_NAME, Module.ModuleType)
else:
PlatformOptions = self.EdkIIBuildOption
+ ModuleTypeOptions = self.Platform.GetBuildOptionsByModuleType(EDKII_NAME, Module.ModuleType)
+ ModuleTypeOptions = self._ExpandBuildOption(ModuleTypeOptions)
ModuleOptions = self._ExpandBuildOption(Module.BuildOptions)
if Module in self.Platform.Modules:
PlatformModule = self.Platform.Modules[str(Module)]
@@ -2084,19 +2087,21 @@ class PlatformAutoGen(AutoGen): PlatformModuleOptions = {}
BuildRuleOrder = None
- for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
+ for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, ModuleTypeOptions, PlatformModuleOptions]:
for Tool in Options:
for Attr in Options[Tool]:
if Attr == TAB_TOD_DEFINES_BUILDRULEORDER:
BuildRuleOrder = Options[Tool][Attr]
- AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() + PlatformModuleOptions.keys() + self.ToolDefinition.keys())
+ AllTools = set(ModuleOptions.keys() + PlatformOptions.keys() +
+ PlatformModuleOptions.keys() + ModuleTypeOptions.keys() +
+ self.ToolDefinition.keys())
BuildOptions = {}
for Tool in AllTools:
if Tool not in BuildOptions:
BuildOptions[Tool] = {}
- for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, PlatformModuleOptions]:
+ for Options in [self.ToolDefinition, ModuleOptions, PlatformOptions, ModuleTypeOptions, PlatformModuleOptions]:
if Tool not in Options:
continue
for Attr in Options[Tool]:
|