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:
@ -819,7 +819,17 @@ class InfBuildData(ModuleBuildClassObject):
|
||||
for Arch, ModuleType in TemporaryDictionary:
|
||||
RetVal[Arch, ModuleType] = TemporaryDictionary[Arch, ModuleType]
|
||||
return RetVal
|
||||
def LocalPkg(self):
|
||||
module_path = self.MetaFile.File
|
||||
subdir = os.path.split(module_path)[0]
|
||||
TopDir = ""
|
||||
while subdir:
|
||||
subdir,TopDir = os.path.split(subdir)
|
||||
|
||||
for file_name in os.listdir(os.path.join(self.MetaFile.Root,TopDir)):
|
||||
if file_name.upper().endswith("DEC"):
|
||||
pkg = os.path.join(TopDir,file_name)
|
||||
return pkg
|
||||
@cached_class_function
|
||||
def GetGuidsUsedByPcd(self):
|
||||
self.Pcds
|
||||
|
Reference in New Issue
Block a user