Skip to content

Commit e2ab799

Browse files
committed
Update toolchain_verify.cpp
1 parent 7cbc7c3 commit e2ab799

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

buildcc/lib/toolchain/src/api/toolchain_verify.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ ToolchainVerify<T>::Verify(const VerifyToolchainConfig &config) {
197197
}
198198

199199
std::vector<VerifiedToolchain> verified_toolchains;
200-
const T &t = static_cast<const T &>(*this);
200+
T &t = static_cast<T &>(*this);
201201

202202
ToolchainMatcher matcher(t);
203203
matcher.FillWithToolchainFilenames();
@@ -252,7 +252,17 @@ ToolchainVerify<T>::Verify(const VerifyToolchainConfig &config) {
252252
}
253253

254254
if (config.update && !verified_toolchains.empty()) {
255-
// TODO, Update logic here
255+
verified_toolchain_ = verified_toolchains[0];
256+
t.asm_compiler_ =
257+
(verified_toolchain_.path / t.asm_compiler_).make_preferred().string();
258+
t.c_compiler_ =
259+
(verified_toolchain_.path / t.c_compiler_).make_preferred().string();
260+
t.cpp_compiler_ =
261+
(verified_toolchain_.path / t.cpp_compiler_).make_preferred().string();
262+
t.archiver_ =
263+
(verified_toolchain_.path / t.archiver_).make_preferred().string();
264+
t.linker_ =
265+
(verified_toolchain_.path / t.linker_).make_preferred().string();
256266
}
257267

258268
return verified_toolchains;

0 commit comments

Comments
 (0)