]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
Move the entrypoint function declarations to AutoGen.h for sake of Intel compiler
[mirror_edk2.git] / Tools / Java / Source / GenBuild / org / tianocore / build / autogen / AutoGen.java
index b7d6ec4e395511997acd6692d79cbeee8dbbcab5..98737ba2bf778b4eeee76a5e06a10325f0903e66 100644 (file)
@@ -784,13 +784,13 @@ public class AutoGen {
             if (entryPointList == null ||entryPointList.length != 1 ) {\r
                 throw new AutoGenException("Module type = 'PEI_CORE', can have only one module entry point!");\r
             } else {\r
-                fileBuffer.append("EFI_STATUS\r\n");\r
-                fileBuffer.append("EFIAPI\r\n");\r
-                fileBuffer.append(entryPointList[0]);\r
-                fileBuffer.append(" (\r\n");\r
-                fileBuffer.append("  IN EFI_PEI_STARTUP_DESCRIPTOR  *PeiStartupDescriptor,\r\n");\r
-                fileBuffer.append("  IN VOID                        *OldCoreData\r\n");\r
-                fileBuffer.append("  );\r\n\r\n");\r
+                functionDeclarations.append("EFI_STATUS\r\n");\r
+                functionDeclarations.append("EFIAPI\r\n");\r
+                functionDeclarations.append(entryPointList[0]);\r
+                functionDeclarations.append(" (\r\n");\r
+                functionDeclarations.append("  IN EFI_PEI_STARTUP_DESCRIPTOR  *PeiStartupDescriptor,\r\n");\r
+                functionDeclarations.append("  IN VOID                        *OldCoreData\r\n");\r
+                functionDeclarations.append("  );\r\n\r\n");\r
 \r
                 fileBuffer.append("EFI_STATUS\r\n");\r
                 fileBuffer.append("EFIAPI\r\n");\r
@@ -811,12 +811,12 @@ public class AutoGen {
             if (entryPointList == null || entryPointList.length != 1) {\r
                 throw new AutoGenException("Module type = 'DXE_CORE', can have only one module entry point!");\r
             } else {\r
-                fileBuffer.append("VOID\r\n");\r
-                fileBuffer.append("EFIAPI\r\n");\r
-                fileBuffer.append(entryPointList[0]);\r
-                fileBuffer.append(" (\r\n");\r
-                fileBuffer.append("  IN VOID  *HobStart\r\n");\r
-                fileBuffer.append("  );\r\n\r\n");\r
+                functionDeclarations.append("VOID\r\n");\r
+                functionDeclarations.append("EFIAPI\r\n");\r
+                functionDeclarations.append(entryPointList[0]);\r
+                functionDeclarations.append(" (\r\n");\r
+                functionDeclarations.append("  IN VOID  *HobStart\r\n");\r
+                functionDeclarations.append("  );\r\n\r\n");\r
 \r
                 fileBuffer.append("VOID\r\n");\r
                 fileBuffer.append("EFIAPI\r\n");\r
@@ -847,13 +847,13 @@ public class AutoGen {
                 break;\r
             }\r
             for (int i = 0; i < entryPointList.length; i++) {\r
-                fileBuffer.append("EFI_STATUS\r\n");\r
-                fileBuffer.append("EFIAPI\r\n");\r
-                fileBuffer.append(entryPointList[i]);\r
-                fileBuffer.append(" (\r\n");\r
-                fileBuffer.append("  IN EFI_FFS_FILE_HEADER  *FfsHeader,\r\n");\r
-                fileBuffer.append("  IN EFI_PEI_SERVICES     **PeiServices\r\n");\r
-                fileBuffer.append("  );\r\n");\r
+                functionDeclarations.append("EFI_STATUS\r\n");\r
+                functionDeclarations.append("EFIAPI\r\n");\r
+                functionDeclarations.append(entryPointList[i]);\r
+                functionDeclarations.append(" (\r\n");\r
+                functionDeclarations.append("  IN EFI_FFS_FILE_HEADER  *FfsHeader,\r\n");\r
+                functionDeclarations.append("  IN EFI_PEI_SERVICES     **PeiServices\r\n");\r
+                functionDeclarations.append("  );\r\n");\r
                 entryPointCount++;\r
             }\r
 \r
@@ -913,13 +913,13 @@ public class AutoGen {
 \r
             } else {\r
                 for (int i = 0; i < entryPointList.length; i++) {\r
-                    fileBuffer.append("EFI_STATUS\r\n");\r
-                    fileBuffer.append("EFIAPI\r\n");\r
-                    fileBuffer.append(entryPointList[i]);\r
-                    fileBuffer.append(" (\r\n");\r
-                    fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
-                    fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
-                    fileBuffer.append("  );\r\n");\r
+                    functionDeclarations.append("EFI_STATUS\r\n");\r
+                    functionDeclarations.append("EFIAPI\r\n");\r
+                    functionDeclarations.append(entryPointList[i]);\r
+                    functionDeclarations.append(" (\r\n");\r
+                    functionDeclarations.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
+                    functionDeclarations.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
+                    functionDeclarations.append("  );\r\n");\r
                     entryPointCount++;\r
                 }\r
                 fileBuffer.append("GLOBAL_REMOVE_IF_UNREFERENCED  const UINT8  _gDriverEntryPointCount = ");\r
@@ -970,11 +970,11 @@ public class AutoGen {
             unloadImageCount = 0;\r
             if (unloadImageList != null) {\r
                 for (int i = 0; i < unloadImageList.length; i++) {\r
-                    fileBuffer.append("EFI_STATUS\r\n");\r
-                    fileBuffer.append(unloadImageList[i]);\r
-                    fileBuffer.append(" (\r\n");\r
-                    fileBuffer.append("  IN EFI_HANDLE        ImageHandle\r\n");\r
-                    fileBuffer.append("  );\r\n");\r
+                    functionDeclarations.append("EFI_STATUS\r\n");\r
+                    functionDeclarations.append(unloadImageList[i]);\r
+                    functionDeclarations.append(" (\r\n");\r
+                    functionDeclarations.append("  IN EFI_HANDLE        ImageHandle\r\n");\r
+                    functionDeclarations.append("  );\r\n");\r
                     unloadImageCount++;\r
                 }\r
             }\r
@@ -1045,13 +1045,13 @@ public class AutoGen {
 \r
             } else {\r
                 for (int i = 0; i < entryPointList.length; i++) {\r
-                    fileBuffer.append("EFI_STATUS\r\n");\r
-                    fileBuffer.append("EFIAPI\r\n");\r
-                    fileBuffer.append(entryPointList[i]);\r
-                    fileBuffer.append(" (\r\n");\r
-                    fileBuffer.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
-                    fileBuffer.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
-                    fileBuffer.append("  );\r\n");\r
+                    functionDeclarations.append("EFI_STATUS\r\n");\r
+                    functionDeclarations.append("EFIAPI\r\n");\r
+                    functionDeclarations.append(entryPointList[i]);\r
+                    functionDeclarations.append(" (\r\n");\r
+                    functionDeclarations.append("  IN EFI_HANDLE        ImageHandle,\r\n");\r
+                    functionDeclarations.append("  IN EFI_SYSTEM_TABLE  *SystemTable\r\n");\r
+                    functionDeclarations.append("  );\r\n");\r
                     entryPointCount++;\r
                 }\r
 \r
@@ -1129,12 +1129,12 @@ public class AutoGen {
             unloadImageCount = 0;\r
             if (unloadImageList != null) {\r
                 for (int i = 0; i < unloadImageList.length; i++) {\r
-                    fileBuffer.append("EFI_STATUS\r\n");\r
-                    fileBuffer.append("EFIAPI\r\n");\r
-                    fileBuffer.append(unloadImageList[i]);\r
-                    fileBuffer.append(" (\r\n");\r
-                    fileBuffer.append("  IN EFI_HANDLE        ImageHandle\r\n");\r
-                    fileBuffer.append("  );\r\n");\r
+                    functionDeclarations.append("EFI_STATUS\r\n");\r
+                    functionDeclarations.append("EFIAPI\r\n");\r
+                    functionDeclarations.append(unloadImageList[i]);\r
+                    functionDeclarations.append(" (\r\n");\r
+                    functionDeclarations.append("  IN EFI_HANDLE        ImageHandle\r\n");\r
+                    functionDeclarations.append("  );\r\n");\r
                     unloadImageCount++;\r
                 }\r
             }\r