Skip to content

Commit 1648d32

Browse files
authored
Fix out of RAM while linking (#232)
1 parent 7a232f2 commit 1648d32

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

server/src/Server.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ Status Server::TestsGenServiceImpl::ProcessBaseTestRequest(BaseTestGen &testGen,
271271
testGen.progressWriter->writeProgress("Building files", 0.0);
272272
Linker linker{ testGen, stubGen, lineInfo, generator };
273273
linker.prepareArtifacts();
274-
linker.writeMakefiles();
275274
auto testMethods = linker.getTestMethods();
276275
KleeRunner kleeRunner{ testGen.projectContext, testGen.settingsContext,
277276
testGen.serverBuildDir };

server/src/building/Linker.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,6 @@ void Linker::prepareArtifacts() {
248248
}
249249
}
250250

251-
void Linker::writeMakefiles() {
252-
for (const printer::TestMakefilesContent &testMakefilesPrinter : linkMakefiles) {
253-
testMakefilesPrinter.write();
254-
}
255-
}
256-
257251
vector<tests::TestMethod> Linker::getTestMethods() {
258252
LOG_S(DEBUG) << StringUtils::stringFormat(
259253
"Linkage statistics:\nAll files: %d\nNumber of files with broken linkage: %d",
@@ -422,7 +416,7 @@ Result<Linker::LinkResult> Linker::link(const CollectionUtils::MapFileTo<fs::pat
422416
auto compilationUnitInfo = testGen.buildDatabase->getClientCompilationUnitInfo(objectFile);
423417
auto sourcePath = compilationUnitInfo->getSourcePath();
424418
if (CollectionUtils::containsKey(testGen.tests, sourcePath)) {
425-
linkMakefiles.push_back(testMakefilesPrinter.GetMakefiles(sourcePath));
419+
testMakefilesPrinter.GetMakefiles(sourcePath).write();
426420
}
427421
}
428422
return LinkResult{ targetBitcode, stubsSet, presentedFiles };

server/src/building/Linker.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class Linker {
3333

3434
void prepareArtifacts();
3535

36-
void writeMakefiles();
37-
3836
std::vector<tests::TestMethod> getTestMethods();
3937

4038
BuildResult
@@ -61,8 +59,6 @@ class Linker {
6159
CollectionUtils::MapFileTo<fs::path> bitcodeFileName;
6260
CollectionUtils::FileSet brokenLinkFiles;
6361

64-
std::vector<printer::TestMakefilesContent> linkMakefiles;
65-
6662
IRParser irParser;
6763

6864
fs::path getSourceFilePath();

0 commit comments

Comments
 (0)