| 8093 | } |
| 8094 | |
| 8095 | bool BfCompiler::Compile(const StringImpl& outputDirectory) |
| 8096 | { |
| 8097 | int passIdx = 0; |
| 8098 | bool success = false; |
| 8099 | while (true) |
| 8100 | { |
| 8101 | auto passState = mPassInstance->GetState(); |
| 8102 | |
| 8103 | success = DoCompile(outputDirectory); |
| 8104 | if (!mExtraCompileRequested) |
| 8105 | break; |
| 8106 | |
| 8107 | mPassInstance->RestoreState(passState); |
| 8108 | |
| 8109 | if (passIdx == 1) |
| 8110 | break; |
| 8111 | passIdx++; |
| 8112 | } |
| 8113 | |
| 8114 | if (!success) |
| 8115 | return false; |
| 8116 | if (mPassInstance->HasFailed()) |
| 8117 | return true; |
| 8118 | if (!mInterfaceSlotCountChanged) |
| 8119 | return true; |
| 8120 | BfLogSysM("Interface slot count increased. Rebuilding relevant modules.\n"); |
| 8121 | mPassInstance->OutputLine("Interface slot count increased. Rebuilding relevant modules."); |
| 8122 | // Recompile with the increased slot count |
| 8123 | success = DoCompile(outputDirectory); |
| 8124 | BF_ASSERT(!mInterfaceSlotCountChanged); |
| 8125 | return success; |
| 8126 | } |
| 8127 | |
| 8128 | void BfCompiler::ClearResults() |
| 8129 | { |
no test coverage detected