@@ -54,7 +54,7 @@ fs::path Linker::getSourceFilePath() {
54
54
Result<Linker::LinkResult> Linker::linkForTarget (const fs::path &target, const fs::path &sourceFilePath,
55
55
const std::shared_ptr<const BuildDatabase::ObjectFileInfo> &compilationUnitInfo,
56
56
const fs::path &objectFile) {
57
- // testGen.setTargetPath(target);
57
+ testGen.setTargetPath (target);
58
58
59
59
auto siblings = testGen.buildDatabase ->getArchiveObjectFiles (target);
60
60
auto stubSources = stubGen.getStubSources (target);
@@ -84,14 +84,6 @@ Result<Linker::LinkResult> Linker::linkForTarget(const fs::path &target, const f
84
84
return stubsSetResult;
85
85
}
86
86
87
- // std::vector<fs::path> Linker::getTargetList(const fs::path &sourceFile, const fs::path &objectFile) const {
88
- // if (testGen.hasAutoTarget()) {
89
- // return testGen.buildDatabase->targetListForFile(sourceFile, objectFile);
90
- // } else {
91
- // return {testGen.buildDatabase->getTargetPath()};
92
- // }
93
- // }
94
-
95
87
void Linker::linkForOneFile (const fs::path &sourceFilePath) {
96
88
ExecUtils::throwIfCancelled ();
97
89
@@ -104,7 +96,6 @@ void Linker::linkForOneFile(const fs::path &sourceFilePath) {
104
96
if (!testGen.buildDatabase ->isFirstObjectFileForSource (objectFile)) {
105
97
return ;
106
98
}
107
- // std::vector <fs::path> targets = getTargetList(sourceFilePath, objectFile);
108
99
std::vector <fs::path> targets = testGen.buildDatabase ->targetListForFile (sourceFilePath, objectFile);
109
100
LOG_S (DEBUG) << " Linking bitcode for file " << sourceFilePath.filename ();
110
101
for (size_t i = 0 ; i < targets.size (); i++) {
@@ -131,7 +122,7 @@ void Linker::linkForOneFile(const fs::path &sourceFilePath) {
131
122
132
123
Result<Linker::LinkResult> Linker::linkWholeTarget (const fs::path &target) {
133
124
auto requestTarget = testGen.buildDatabase ->getTargetPath ();
134
- LOG_IF_S (ERROR, target != GrpcUtils::UTBOT_AUTO_TARGET_PATH && requestTarget != target)
125
+ LOG_IF_S (WARNING, !testGen. buildDatabase -> hasAutoTarget () && requestTarget != target)
135
126
<< " Try link target that not specified by user" ;
136
127
testGen.setTargetPath (target);
137
128
@@ -153,11 +144,11 @@ Result<Linker::LinkResult> Linker::linkWholeTarget(const fs::path &target) {
153
144
}
154
145
if (!CollectionUtils::contains (testedFiles, objectInfo->getSourcePath ()) && insideFolder) {
155
146
fs::path bitcodeFile = objectInfo->kleeFilesInfo ->getKleeBitcodeFile ();
156
- filesToLink.emplace (objectFile, std::move ( bitcodeFile) );
147
+ filesToLink.emplace (objectFile, bitcodeFile);
157
148
} else {
158
149
fs::path bitcodeFile = testGen.buildDatabase ->getBitcodeForSource (objectInfo->getSourcePath ());
159
150
siblingObjectsToBuild.insert (objectInfo->getOutputFile ());
160
- filesToLink.emplace (objectFile, std::move ( bitcodeFile) );
151
+ filesToLink.emplace (objectFile, bitcodeFile);
161
152
}
162
153
}
163
154
@@ -184,7 +175,6 @@ void Linker::linkForProject() {
184
175
<< sourceFile;
185
176
return ;
186
177
}
187
- // std::vector <fs::path> targets = getTargetList(sourceFile, objectFile);
188
178
std::vector <fs::path> targets = testGen.buildDatabase ->targetListForFile (sourceFile, objectFile);
189
179
bool success = false ;
190
180
for (const auto &target : targets) {
0 commit comments