File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
buildcc/lib/toolchain/src/api Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -233,13 +233,28 @@ ToolchainVerify<T>::Verify(const VerifyToolchainConfig &config) {
233233 vt.path = p;
234234 vt.compiler_version = env::trim (GetCompilerVersion (p, t).value_or (" " ));
235235 vt.target_arch = env::trim (GetCompilerArchitecture (p, t).value_or (" " ));
236- verified_toolchains.push_back (vt);
236+
237+ // Check add
238+ bool add{true };
239+ if (config.compiler_version .has_value ()) {
240+ add = add && (config.compiler_version .value () == vt.compiler_version );
241+ }
242+ if (config.target_arch .has_value ()) {
243+ add = add && (config.target_arch .value () == vt.target_arch );
244+ }
245+ if (add) {
246+ verified_toolchains.push_back (vt);
247+ }
237248 }
238249
239250 // Reset
240251 matcher.FillWithToolchainFilenames ();
241252 }
242253
254+ if (config.update && !verified_toolchains.empty ()) {
255+ // TODO, Update logic here
256+ }
257+
243258 return verified_toolchains;
244259}
245260
You can’t perform that action at this time.
0 commit comments