summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
index 1dbcb2306a..92f320bc35 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
@@ -1533,6 +1533,15 @@ public class CollectPCDAction {
datum = pcdBuildData.getValue();
maxDatumSize = pcdBuildData.getMaxDatumSize();
+ if ((pcdType == Token.PCD_TYPE.FEATURE_FLAG) &&
+ (datumType != Token.DATUM_TYPE.BOOLEAN)){
+ exceptionString = String.format("[FPD file error] For PCD %s in module %s, the PCD type is FEATRUE_FLAG but "+
+ "datum type of this PCD entry is not BOOLEAN!",
+ pcdBuildData.getCName(),
+ moduleName);
+ throw new EntityException(exceptionString);
+ }
+
//
// Check <TokenSpaceGuid> is exist? In future, because all schema verification will tools
// will check that, following checking code could be removed.