]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
1, Fix EDKT141
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / autogen / AutoGen.java
index 366e0ac59d98de60400444fce8d63ceff549e82a..a8ec270355146dd8693d376a193171900050f649 100644 (file)
@@ -456,25 +456,18 @@ public class AutoGen {
                GuidGuidToAutogenC(fileBuffer);\r
 \r
                //\r
-               // Call pcd autogen. PCDAutoGenAction tool only need module name and\r
-               // isPcdEmulatedDriver as parameter. Library inherits PCD and module's\r
-               // PCD information has been collected in FPDParser task by\r
-               // CollectPCDAction.\r
-               // Note : when PCD image tool ready,\r
-               // isPCDEmulatedDriver parameter will be removed.\r
-               //\r
-                try {\r
-//              this.myPcdAutogen = new PCDAutoGenAction(moduleId.getName(),\r
-//              moduleId.getGuid(), moduleId.getPackage().getName(), moduleId.getPackage().getGuid(),this.arch,moduleId.getVersion(),false, null);\r
-         this.myPcdAutogen = new PCDAutoGenAction(moduleId.getName(),null,null,null, this.arch,null,false, null);\r
-                this.myPcdAutogen.execute();\r
-                } catch (Exception e) {\r
-                throw new BuildException("PCD Autogen failed:" + e.getMessage());\r
-                }\r
+               // Call pcd autogen. \r
+               //\r
+                this.myPcdAutogen = new PCDAutoGenAction(moduleId, this.arch, false, null);\r
+                try {\r
+                    this.myPcdAutogen.execute();\r
+                } catch (Exception exp) {\r
+                    throw new BuildException (exp.getMessage());\r
+                }\r
                \r
                if (this.myPcdAutogen != null) {\r
-            fileBuffer.append("\r\n");\r
-                       fileBuffer.append(this.myPcdAutogen.OutputC());\r
+                    fileBuffer.append("\r\n");\r
+                    fileBuffer.append(this.myPcdAutogen.OutputC());\r
                }\r
 \r
                if (!saveFile(outputPath + File.separatorChar + "AutoGen.c", fileBuffer)) {\r
@@ -613,33 +606,21 @@ public class AutoGen {
                fileBuffer.append("\r\n");\r
 \r
                //\r
-               // Call pcd autogen. PCDAutoGenAction tool only need module name and\r
-               // isPcdEmulatedDriver as parameter. Library inherit PCD and module's\r
-               // PCD information has been collected in FPDParser task by\r
-               // CollectPCDAction.\r
-               // Note : when PCD image tool ready,\r
-               // isPCDEmulatedDriver parameter will be removed.\r
+               // Call pcd autogen. \r
                //\r
+                this.myPcdAutogen = new PCDAutoGenAction(this.moduleId,\r
+                                                         this.arch,\r
+                                                         true, \r
+                                                         SurfaceAreaQuery.getModulePcdEntryNameArray());\r
                try {\r
-//                      this.myPcdAutogen = new PCDAutoGenAction(this.moduleId.getName(),\r
-//                      this.moduleId.getGuid(),moduleId.getPackage().getName(),moduleId.getPackage().getGuid(), this.arch, moduleId.getVersion(),true, SurfaceAreaQuery.getModulePcdEntryNameArray());\r
-            this.myPcdAutogen = new PCDAutoGenAction(this.moduleId.getName(),\r
-                                                     null,\r
-                                                     null,\r
-                                                     null,\r
-                                                     this.arch,\r
-                                                     null,\r
-                                                     true, \r
-                                                     SurfaceAreaQuery.getModulePcdEntryNameArray());\r
-                     \r
-                       this.myPcdAutogen.execute();\r
+                    this.myPcdAutogen.execute();\r
                } catch (Exception e) {\r
-                       throw new BuildException(e.getMessage());\r
+                    throw new BuildException(e.getMessage());\r
                }\r
 \r
                if (this.myPcdAutogen != null) {\r
-            fileBuffer.append("\r\n");\r
-                       fileBuffer.append(this.myPcdAutogen.OutputC());\r
+                    fileBuffer.append("\r\n");\r
+                    fileBuffer.append(this.myPcdAutogen.OutputC());\r
                }\r
 \r
                if (!saveFile(outputPath + File.separatorChar + "AutoGen.c", fileBuffer)) {\r