diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-12-26 16:17:13 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-12-27 14:43:27 +0800 |
commit | 726c501c2c9a1ef103fab7846e2d1a34506715d8 (patch) | |
tree | 51c6cb2ce0a1a49400d8ef2255327dd330b177f1 /BaseTools/Source/Python/Workspace/WorkspaceCommon.py | |
parent | 68ba919f7858830cc764b46a00da7e7fdcd1f3ec (diff) | |
download | edk2-726c501c2c9a1ef103fab7846e2d1a34506715d8.tar.gz edk2-726c501c2c9a1ef103fab7846e2d1a34506715d8.tar.bz2 edk2-726c501c2c9a1ef103fab7846e2d1a34506715d8.zip |
BaseTools: Support PCD flexible values format
https://bugzilla.tianocore.org/show_bug.cgi?id=541
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Workspace/WorkspaceCommon.py')
-rw-r--r-- | BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py index c289b9d2b5..c760e57b8f 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -1,7 +1,7 @@ ## @file
# Common routines used by workspace
#
-# Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -43,13 +43,17 @@ def GetPackageList(Platform, BuildDatabase, Arch, Target, Toolchain): # @param Target: Current target
# @param Toolchain: Current toolchain
# @retval: A dictionary contains instances of PcdClassObject with key (PcdCName, TokenSpaceGuid)
+# @retval: A dictionary contains real GUIDs of TokenSpaceGuid
#
def GetDeclaredPcd(Platform, BuildDatabase, Arch, Target, Toolchain,additionalPkgs):
PkgList = GetPackageList(Platform, BuildDatabase, Arch, Target, Toolchain)
PkgList = set(PkgList)
PkgList |= additionalPkgs
DecPcds = {}
+ GuidDict = {}
for Pkg in PkgList:
+ Guids = Pkg.Guids
+ GuidDict.update(Guids)
for Pcd in Pkg.Pcds:
PcdCName = Pcd[0]
PcdTokenName = Pcd[1]
@@ -60,7 +64,7 @@ def GetDeclaredPcd(Platform, BuildDatabase, Arch, Target, Toolchain,additionalPk break
if (PcdCName, PcdTokenName) not in DecPcds.keys():
DecPcds[PcdCName, PcdTokenName] = Pkg.Pcds[Pcd]
- return DecPcds
+ return DecPcds, GuidDict
## Get all dependent libraries for a module
#
|