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>
This commit is contained in:
@ -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
|
||||
#
|
||||
|
Reference in New Issue
Block a user