Fixed EDKT538; Removed the some code generation for UEFI_APPLICATION type of module...
[mirror_edk2.git] / Tools / Java / Source / GenBuild / org / tianocore / build / autogen / AutoGen.java
index e3e6ff54fec2ab6657051dc2cbc0d12e7fcd1740..b1414a7c75be072b7c0a81766caaddc677db018f 100644 (file)
@@ -430,8 +430,9 @@ public class AutoGen {
         // DriverBinding/ComponentName/DriverConfiguration/DriverDialog\r
         // to AutoGen.c\r
         //\r
-\r
-        ExternsDriverBindingToAutoGenC(fileBuffer);\r
+        if (!moduleId.getModuleType().equalsIgnoreCase("UEFI_APPLICATION")) {\r
+            ExternsDriverBindingToAutoGenC(fileBuffer);\r
+        }\r
 \r
         //\r
         // Write DriverExitBootServicesEvent/DriverSetVirtualAddressMapEvent\r
@@ -1133,6 +1134,9 @@ public class AutoGen {
                 fileBuffer.append("}\r\n\r\n");\r
             }\r
 \r
+            if (CommonDefinition.getModuleType(typeStr) == CommonDefinition.ModuleTypeUefiApplication) {\r
+                break;\r
+            }\r
             //\r
             // Add ModuleUnloadImage for DxeDriver and UefiDriver module type.\r
             //\r
@@ -1950,7 +1954,6 @@ public class AutoGen {
         case CommonDefinition.ModuleTypeDxeRuntimeDriver:\r
         case CommonDefinition.ModuleTypeDxeSalDriver:\r
         case CommonDefinition.ModuleTypeUefiDriver:\r
-        case CommonDefinition.ModuleTypeUefiApplication:\r
             //\r
             //  If moduleType is one of above, call setVirtualAddressToAutogenC,\r
             //  and setExitBootServiceToAutogenC.\r