diff options
author | tgingold <tgingold@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-12 23:22:29 +0000 |
---|---|---|
committer | tgingold <tgingold@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-12 23:22:29 +0000 |
commit | b991a45139b0b5a0b5082b63fa27cf8ef8e6fd1b (patch) | |
tree | 95cd18eaa5abee647e4aec1f1b74c44c7069f938 /Tools | |
parent | b28d0bd1d2375b604371067257804d6fcc99536a (diff) | |
download | edk2-platforms-b991a45139b0b5a0b5082b63fa27cf8ef8e6fd1b.tar.xz |
Disp dependencies in error in case of circular dependency
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2245 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java | 15 |
1 files changed, 13 insertions, 2 deletions
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 37c54f50af..042f0447ef 100644 --- a/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java +++ b/Tools/Java/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java @@ -231,17 +231,28 @@ public class AutogenLibOrder { //
// Append the remaining library instance to the end of sorted list
//
+ boolean HasError = false;
for (int i = 0; i < libInstanceList.length; ++i) {
- if (libInstanceConsumedBy.get(libInstanceList[i]).size() > 0 && libInstanceList[i].hasConstructor()) {
+ HashSet<ModuleIdentification> consumedBy = libInstanceConsumedBy.get(libInstanceList[i]);
+ if (consumedBy.size() > 0 && libInstanceList[i].hasConstructor()) {
EdkLog.log(EdkLog.EDK_ERROR, libInstanceList[i].getName()
+ " with constructor has a circular dependency!");
- throw new AutoGenException("Circular dependency in library instances is found!");
+ ModuleIdentification[] consumedByList = consumedBy.toArray(new ModuleIdentification[consumedBy.size()]);
+ for (int j = 0; j < consumedByList.length; ++j) {
+ EdkLog.log(EdkLog.EDK_ERROR,
+ " consumed by " + consumedByList[j].getName());
+ }
+ HasError = true;
}
if (!orderList.contains(libInstanceList[i])) {
orderList.add(libInstanceList[i]);
}
}
+ if (HasError) {
+ throw new AutoGenException("Circular dependency in library instances is found!");
+ }
+
return orderList;
}
}
|