]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
Fixed the issue in multi-msa build in single mode; cleaned the code of re-ordering...
[mirror_edk2.git] / Tools / Java / Source / GenBuild / org / tianocore / build / fpd / FpdParserTask.java
index e28ac19eca828986a16440a12ab11ccd82d81b4a..325dc437b673154290160a574a6cef8fc059bf14 100644 (file)
@@ -75,6 +75,11 @@ import org.w3c.dom.NodeList;
 **/\r
 public class FpdParserTask extends Task {\r
 \r
+    ///\r
+    /// Be used to ensure Global data will be initialized only once.\r
+    ///\r
+    private static boolean parsed = false;\r
+\r
     private File fpdFile = null;\r
 \r
     PlatformIdentification platformId;\r
@@ -494,8 +499,10 @@ public class FpdParserTask extends Task {
             //\r
             // Pcd Collection. Call CollectPCDAction to collect pcd info.\r
             //\r
-            PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding();\r
-            ca.perform(platformId.getFpdFile().getPath());\r
+            if (!parsed) {\r
+                PlatformPcdPreprocessActionForBuilding ca = new PlatformPcdPreprocessActionForBuilding();\r
+                ca.perform(platformId.getFpdFile().getPath());\r
+            }\r
         } catch (IOException ex) {\r
             BuildException buildException = new BuildException("Parsing of the FPD file [" + fpdFile.getPath() + "] failed!\n" + ex.getMessage());\r
             buildException.setStackTrace(ex.getStackTrace());\r
@@ -509,6 +516,9 @@ public class FpdParserTask extends Task {
             buildException.setStackTrace(ex.getStackTrace());\r
             throw buildException;\r
         }\r
+        if (!parsed) {\r
+            parsed = true;\r
+        }\r
     }\r
 \r
     /**\r