From 726c501c2c9a1ef103fab7846e2d1a34506715d8 Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Tue, 26 Dec 2017 16:17:13 +0800 Subject: 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 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'BaseTools/Source/Python/Workspace/WorkspaceCommon.py') 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.
+# Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.
# 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 # -- cgit v1.2.3