From 3f4c8a37923d979844035434b7c4c7f5a19cdba5 Mon Sep 17 00:00:00 2001 From: Vladislav Kalugin Date: Wed, 8 Dec 2021 18:13:42 +0300 Subject: [PATCH] fix sftp --- server/src/building/Linker.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/server/src/building/Linker.cpp b/server/src/building/Linker.cpp index 1154fb2d..9018cb7a 100644 --- a/server/src/building/Linker.cpp +++ b/server/src/building/Linker.cpp @@ -68,21 +68,18 @@ Result Linker::linkForTarget(const fs::path &target, const f auto stubSources = stubGen.getStubSources(target); CollectionUtils::MapFileTo filesToLink; - filesToLink.insert({ objectFile, compilationUnitInfo->kleeFilesInfo->getKleeBitcodeFile() }); for (const auto &sibling : siblings) { - if (sibling != objectFile) { - auto siblingCompilationUnitInfo = - testGen.buildDatabase->getClientCompilationUnitInfo(sibling); - fs::path siblingObjectFile = siblingCompilationUnitInfo->getOutputFile(); - fs::path bitcodeFile = testGen.buildDatabase->getBitcodeForSource( - siblingCompilationUnitInfo->getSourcePath()); - if (CollectionUtils::contains(stubSources, - siblingCompilationUnitInfo->getSourcePath())) { - bitcodeFile = - LinkerUtils::applySuffix(bitcodeFile, BuildResult::Type::ALL_STUBS, ""); - } - filesToLink.emplace(siblingObjectFile, bitcodeFile); + auto siblingCompilationUnitInfo = + testGen.buildDatabase->getClientCompilationUnitInfo(sibling); + fs::path siblingObjectFile = siblingCompilationUnitInfo->getOutputFile(); + fs::path bitcodeFile = testGen.buildDatabase->getBitcodeForSource( + siblingCompilationUnitInfo->getSourcePath()); + if (CollectionUtils::contains(stubSources, + siblingCompilationUnitInfo->getSourcePath())) { + bitcodeFile = + LinkerUtils::applySuffix(bitcodeFile, BuildResult::Type::ALL_STUBS, ""); } + filesToLink.emplace(siblingObjectFile, bitcodeFile); } kleeGenerator->buildByCDb(filesToLink, stubSources);