summaryrefslogtreecommitdiff
path: root/Tools/Java
diff options
context:
space:
mode:
authorjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-27 03:05:30 +0000
committerjwang36 <jwang36@6f19259b-4bc3-4df7-8a09-765794883524>2007-03-27 03:05:30 +0000
commit253d2919cd1ad0ee4365b5a57e990287e08d5c97 (patch)
treeed089ff1a4f794033b6727c42ba33bbed8b0efe6 /Tools/Java
parenta5dd05b513de4bd0f246a05d45a41952a697d596 (diff)
downloadedk2-platforms-253d2919cd1ad0ee4365b5a57e990287e08d5c97.tar.xz
Fixed an Autogen issue which will cause build break when encountering some kind of module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2507 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java')
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java24
-rw-r--r--Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java12
2 files changed, 26 insertions, 10 deletions
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
index ae1ac7ec93..8482401bb0 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/FrameworkBuildTask.java
@@ -120,32 +120,44 @@ public class FrameworkBuildTask extends Task{
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (PcdAutogenException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (AutoGenException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (PlatformPcdPreprocessBuildException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (GenBuildException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
} catch (EdkException e) {
//
// Add more logic process here
//
- throw new BuildException(e.getMessage());
+ BuildException buildException = new BuildException(e.getMessage());
+ buildException.setStackTrace(e.getStackTrace());
+ throw buildException;
}
}
diff --git a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java
index 7e87e28ba3..a131b89cc8 100644
--- a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java
+++ b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java
@@ -158,7 +158,11 @@ public class AutogenLibOrder {
// First, add the library instance without consumers to the Q
//
for (int i = 0; i < libInstanceList.length; ++i) {
- if (libInstanceConsumedBy.get(libInstanceList[i]).size() == 0) {
+ if (libInstanceList[i] == null) {
+ continue;
+ }
+
+ if (libInstanceConsumedBy.get(libInstanceList[i]) == null || libInstanceConsumedBy.get(libInstanceList[i]).size() == 0) {
noConsumerList.add(libInstanceList[i]);
}
}
@@ -174,7 +178,7 @@ public class AutogenLibOrder {
continue;
}
HashSet<ModuleIdentification> consumedBy = libInstanceConsumedBy.get(m);
- if (consumedBy.size() == 0) {
+ if (consumedBy == null || consumedBy.size() == 0) {
continue;
}
@@ -194,7 +198,7 @@ public class AutogenLibOrder {
}
HashSet<ModuleIdentification> consumedBy = libInstanceConsumedBy.get(libInstance);
- if (consumedBy.size() == 0) {
+ if (consumedBy == null || consumedBy.size() == 0) {
continue;
}
@@ -234,7 +238,7 @@ public class AutogenLibOrder {
boolean HasError = false;
for (int i = 0; i < libInstanceList.length; ++i) {
HashSet<ModuleIdentification> consumedBy = libInstanceConsumedBy.get(libInstanceList[i]);
- if (consumedBy.size() > 0 && libInstanceList[i].hasConstructor()) {
+ if (consumedBy != null && consumedBy.size() > 0 && libInstanceList[i].hasConstructor()) {
EdkLog.log(EdkLog.EDK_ERROR, libInstanceList[i].getName()
+ " with constructor has a circular dependency!");
ModuleIdentification[] consumedByList = consumedBy.toArray(new ModuleIdentification[consumedBy.size()]);