]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/pcd/action/CollectPCDAction.java
Fix a bug of unreference PCD token defined in FPD does *not* be autogened into emulat...
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / pcd / action / CollectPCDAction.java
index 99290058722899f23596533d21210dbcb2e4de2a..4cddce2f902f767567ad1ff303f38b716256521e 100644 (file)
@@ -373,15 +373,13 @@ public class CollectPCDAction {
 \r
         if(Token.PCD_USAGE.UNKNOWN != token.isUsageInstanceExist(moduleName)) {\r
             //\r
-            // BUGBUG: It should *not* throw exception here. Becaues in MdePkg.fpd, \r
-            // more than on BaseLib exist. But why? need confirmation.\r
+            // BUGBUG: It is legal that same base name exist in one FPD file. In furture\r
+            //         we should use "Guid, Version, Package" and "Arch" to differ a module.\r
+            //         So currently, warning should be disabled.\r
             //\r
-            //throw new EntityException(\r
-            //  "In module " + moduleName + " exist more than one PCD token " + token.cName\r
-            //  );\r
-            ActionMessage.warning(this,\r
-                                  "In module " + moduleName + " exist more than one PCD token " + token.cName\r
-                                  );\r
+            //ActionMessage.warning(this,\r
+            //                      "In module " + moduleName + " exist more than one PCD token " + token.cName\r
+            //                      );\r
             return null;\r
         }\r
 \r
@@ -491,6 +489,7 @@ public class CollectPCDAction {
             // BUGBUG: in FPD, <defaultValue> should be defined as <Value>\r
             //\r
             token.datum        = pcdBuildData.getDefaultValue();\r
+            token.tokenNumber  = Integer.decode(pcdBuildData.getToken().getStringValue());\r
             token.hiiEnabled   = pcdBuildData.getHiiEnable();\r
             token.variableGuid = Token.getGUIDFromSchemaObject(pcdBuildData.getVariableGuid());\r
             token.variableName = pcdBuildData.getVariableName();\r