BaseTools: Add functions to get platform scope build options
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875 These functions are used for get platform scope build options. They will be used in later patches. Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Acked-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -2486,7 +2486,15 @@ class PlatformAutoGen(AutoGen):
|
||||
else:
|
||||
BuildOptions[Tool][Attr] = Options[Key]
|
||||
return BuildOptions
|
||||
|
||||
def GetGlobalBuildOptions(self,Module):
|
||||
ModuleTypeOptions = self.Platform.GetBuildOptionsByPkg(Module, Module.ModuleType)
|
||||
ModuleTypeOptions = self._ExpandBuildOption(ModuleTypeOptions)
|
||||
if Module in self.Platform.Modules:
|
||||
PlatformModule = self.Platform.Modules[str(Module)]
|
||||
PlatformModuleOptions = self._ExpandBuildOption(PlatformModule.BuildOptions)
|
||||
else:
|
||||
PlatformModuleOptions = {}
|
||||
return ModuleTypeOptions, PlatformModuleOptions
|
||||
## Append build options in platform to a module
|
||||
#
|
||||
# @param Module The module to which the build options will be appended
|
||||
|
Reference in New Issue
Block a user