diff options
author | Feng, Bob C <bob.c.feng@intel.com> | 2019-05-27 22:19:25 +0800 |
---|---|---|
committer | Feng, Bob C <bob.c.feng@intel.com> | 2019-08-09 23:15:52 +0800 |
commit | 197ca7febf8668be505ff904f75b97f9e465df82 (patch) | |
tree | 9075e86042a29b13efa136feb3b440ef7af98042 /BaseTools/Source/Python/AutoGen | |
parent | 2927a6fd999adf004fa239e7d8ec91bac1e682d8 (diff) | |
download | edk2-197ca7febf8668be505ff904f75b97f9e465df82.tar.gz edk2-197ca7febf8668be505ff904f75b97f9e465df82.tar.bz2 edk2-197ca7febf8668be505ff904f75b97f9e465df82.zip |
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 122696f5ce..bb0da46d74 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -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
|