summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Workspace/InfBuildData.py
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-05-27 22:19:25 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-08-09 23:15:52 +0800
commit197ca7febf8668be505ff904f75b97f9e465df82 (patch)
tree9075e86042a29b13efa136feb3b440ef7af98042 /BaseTools/Source/Python/Workspace/InfBuildData.py
parent2927a6fd999adf004fa239e7d8ec91bac1e682d8 (diff)
downloadedk2-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/Workspace/InfBuildData.py')
-rw-r--r--BaseTools/Source/Python/Workspace/InfBuildData.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py
index 60970cd928..da35391d3a 100644
--- a/BaseTools/Source/Python/Workspace/InfBuildData.py
+++ b/BaseTools/Source/Python/Workspace/InfBuildData.py
@@ -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