summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2013-08-23 02:18:16 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2013-08-23 02:18:16 +0000
commit4afd3d042215afe68d00b9ab8c32f063a3a1c03f (patch)
treeb5190bd11547ac22fe35eeceee85ef42bfe6eea5 /BaseTools/Source/Python/AutoGen/AutoGen.py
parenta365eed476687881ce0ed49af7d483fd3cb0c491 (diff)
downloadedk2-platforms-4afd3d042215afe68d00b9ab8c32f063a3a1c03f.tar.xz
Sync BaseTool trunk (version r2599) into EDKII BaseTools.
Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Heshen Chen <chen.heshen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 3261892bc5..6711880f60 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -293,12 +293,13 @@ class WorkspaceAutoGen(AutoGen):
Platform = self.BuildDatabase[self.MetaFile, Arch, Target, Toolchain]
DecPcds = {}
+ DecPcdsKey = set()
PGen = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
Pkgs = PGen.PackageList
for Pkg in Pkgs:
for Pcd in Pkg.Pcds:
DecPcds[Pcd[0], Pcd[1]] = Pkg.Pcds[Pcd]
- Platform.IsPlatformPcdDeclared(DecPcds)
+ DecPcdsKey.add((Pcd[0], Pcd[1], Pcd[2]))
Platform.SkuName = self.SkuId
for Name, Guid in PcdSet:
@@ -310,7 +311,21 @@ class WorkspaceAutoGen(AutoGen):
File = self.FdfProfile.PcdFileLineDict[Name, Guid][0],
Line = self.FdfProfile.PcdFileLineDict[Name, Guid][1]
)
- Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])
+ else:
+ # Check whether Dynamic or DynamicEx PCD used in FDF file. If used, build break and give a error message.
+ if (Name, Guid, TAB_PCDS_FIXED_AT_BUILD) in DecPcdsKey \
+ or (Name, Guid, TAB_PCDS_PATCHABLE_IN_MODULE) in DecPcdsKey \
+ or (Name, Guid, TAB_PCDS_FEATURE_FLAG) in DecPcdsKey:
+ Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])
+ continue
+ elif (Name, Guid, TAB_PCDS_DYNAMIC) in DecPcdsKey or (Name, Guid, TAB_PCDS_DYNAMIC_EX) in DecPcdsKey:
+ EdkLogger.error(
+ 'build',
+ PARSER_ERROR,
+ "Using Dynamic or DynamicEx type of PCD [%s.%s] in FDF file is not allowed." % (Guid, Name),
+ File = self.FdfProfile.PcdFileLineDict[Name, Guid][0],
+ Line = self.FdfProfile.PcdFileLineDict[Name, Guid][1]
+ )
Pa = PlatformAutoGen(self, self.MetaFile, Target, Toolchain, Arch)
#