From bf1ea933ec1c6447c4168c34cc1b7ea4ac8f3e4d Mon Sep 17 00:00:00 2001 From: "Fan, ZhijuX" Date: Thu, 14 Nov 2019 09:27:42 +0800 Subject: BaseTools:Add [packages] section in dsc file BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2270 Currently a PCD (e.g. FeaturePCD) cannot be used in a conditional statement in a DSC/FDF file without a module in the build referencing the PCD package DEC file. An example implementation that to support this is to allow a [Packages] section in the DSC file to list additional package dependencies for PCD references in the package DSC/FDF files. this patch is going to add the ability to have the [packages] section defined in the DSC file Cc: Liming Gao Cc: Bob Feng Signed-off-by: Zhiju.Fan Acked-by: Liming Gao Reviewed-by: Bob Feng --- BaseTools/Source/Python/Workspace/WorkspaceCommon.py | 2 ++ 1 file changed, 2 insertions(+) (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 0b11ec2d59..913e710fd9 100644 --- a/BaseTools/Source/Python/Workspace/WorkspaceCommon.py +++ b/BaseTools/Source/Python/Workspace/WorkspaceCommon.py @@ -37,6 +37,8 @@ class OrderedListDict(OrderedDict): # def GetPackageList(Platform, BuildDatabase, Arch, Target, Toolchain): PkgSet = set() + if Platform.Packages: + PkgSet.update(Platform.Packages) for ModuleFile in Platform.Modules: Data = BuildDatabase[ModuleFile, Arch, Target, Toolchain] PkgSet.update(Data.Packages) -- cgit v1.2.3