BaseTools: Fix two cases that use GUID CName as PCD Value

1. use CName format in components section:
  [Components]
   TestPkg/TestDriver.inf {
     <PcdsFixedAtBuild>
      PcdToken.PcdName |{GUID(TestGuid)}|VOID*|16
  }

2. Use Guid CName format in INF and the Guid is defined in the DEC
file but not write in driver's [Guids] section.
    PcdToken.PcdName  | {GUID(TestGuid)}

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <[email protected]>
Reviewed-by: Liming Gao <[email protected]>
(cherry picked from commit f9fa014ee0)
This commit is contained in:
Yonghong Zhu committed 2018-07-05 11:24:00 +08:00
1 parent c09b794757
commit 6877a0a9c4
2 files changed
+4 -6

No files matched your search

+3 -6
View File
@@ -398,12 +398,8 @@ class WorkspaceAutoGen(AutoGen):
# apply SKU and inject PCDs from Flash Definition file
for Arch in self.ArchList:
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
PlatformPcds = Platform.Pcds
self._GuidDict = Platform._GuidDict
SourcePcdDict = {'DynamicEx':[], 'PatchableInModule':[],'Dynamic':[],'FixedAtBuild':[]}
BinaryPcdDict = {'DynamicEx':[], 'PatchableInModule':[]}
SourcePcdDict_Keys = SourcePcdDict.keys()
@@ -2823,6 +2819,7 @@ class ModuleAutoGen(AutoGen):
self.Workspace = Workspace
self.WorkspaceDir = Workspace.WorkspaceDir
self._GuidDict = Workspace._GuidDict
self.MetaFile = ModuleFile
self.PlatformInfo = PlatformAutoGen(Workspace, PlatformFile, Target, Toolchain, Arch)
# check if this module is employed by active platform
@@ -1056,6 +1056,7 @@ class InfBuildData(ModuleBuildClassObject):
#
# "FixedAtBuild", "PatchableInModule", "FeatureFlag", "Dynamic", "DynamicEx"
#
self.Guids.update(Package.Guids)
PcdType = self._PCD_TYPE_STRING_[Type]
if Type == MODEL_PCD_DYNAMIC:
Pcd.Pending = True