Added a test to check the # of threads iff threading is enabled. If it's not enabled...
[mirror_edk2.git] / Tools / Java / Source / GenBuild / org / tianocore / build / FrameworkBuildTask.java
index fce5108..1165263 100644 (file)
@@ -110,11 +110,17 @@ public class FrameworkBuildTask extends Task{
         // set Logger\r
         //\r
         GenBuildLogger logger = new GenBuildLogger(getProject());\r
+               EdkLog.setLogLevel(EdkLog.EDK_DEBUG);\r
         EdkLog.setLogLevel(getProject().getProperty("env.LOGLEVEL"));\r
         EdkLog.setLogger(logger);\r
         \r
         try {\r
             processFrameworkBuild();\r
+        }catch (BuildException e) {\r
+            //\r
+            // Add more logic process here\r
+            //\r
+            throw new BuildException(e.getMessage());\r
         } catch (PcdAutogenException e) {\r
             //\r
             // Add more logic process here\r
@@ -369,7 +375,10 @@ public class FrameworkBuildTask extends Task{
         }\r
 \r
         str = getValue(ToolDefinitions.TARGET_KEY_MAX_CONCURRENT_THREAD_NUMBER, targetFileInfo);\r
-        if (str != null ) {\r
+        //\r
+        // Need to check the # of threads iff multithread is enabled.\r
+        //\r
+        if ((multithread) && (str != null )) {\r
             try {\r
                 int threadNum = Integer.parseInt(str);\r
                 if (threadNum > 0) {\r