Added a workaround to fix the library instance constructor sequence issue.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2221 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jwang36 2007-01-11 09:00:36 +00:00
parent 957407060b
commit d919bb8cf9
1 changed files with 11 additions and 1 deletions

View File

@ -223,8 +223,18 @@ public class AutogenLibOrder {
// Append the remaining library instance to the end of sorted list // Append the remaining library instance to the end of sorted list
// //
for (int i = 0; i < libInstanceList.length; ++i) { for (int i = 0; i < libInstanceList.length; ++i) {
if (libInstanceConsumedBy.get(libInstanceList[i]).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!");
}
if (!orderList.contains(libInstanceList[i])) { if (!orderList.contains(libInstanceList[i])) {
orderList.add(libInstanceList[i]); if (libInstanceList[i].getName().equals("UefiBootServicesTableLib")) {
orderList.addFirst(libInstanceList[i]);
} else {
orderList.add(libInstanceList[i]);
}
} }
} }
return orderList; return orderList;