]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
Add DATUM_TYPE checking for FEATURE_FLAG PCD entry. For FEATURE_FLAG PCD, the datum...
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / pcd / action / CollectPCDAction.java
index 1dbcb2306a10b287a1a66cf3c991f84c0246b923..92f320bc3557a07979f3ac3b7bd4fd5060db3495 100644 (file)
@@ -1533,6 +1533,15 @@ public class CollectPCDAction {
                 datum        = pcdBuildData.getValue();\r
                 maxDatumSize = pcdBuildData.getMaxDatumSize();\r
 \r
+                if ((pcdType    == Token.PCD_TYPE.FEATURE_FLAG) &&\r
+                    (datumType  != Token.DATUM_TYPE.BOOLEAN)){\r
+                    exceptionString = String.format("[FPD file error] For PCD %s in module %s, the PCD type is FEATRUE_FLAG but "+\r
+                                                    "datum type of this PCD entry is not BOOLEAN!",\r
+                                                    pcdBuildData.getCName(),\r
+                                                    moduleName);\r
+                    throw new EntityException(exceptionString);\r
+                }\r
+\r
                 //\r
                 // Check <TokenSpaceGuid> is exist? In future, because all schema verification will tools\r
                 // will check that, following checking code could be removed.\r