@@ -24,8 +24,6 @@ toolchain_verify.h
2424
2525..doxygenstruct ::buildcc::ToolchainCompilerInfo
2626
27- ..doxygentypedef ::ToolchainVerificationFunc
28-
2927Example for Default Toolchain
3028------------------------------
3129
@@ -62,13 +60,27 @@ Example for Custom Toolchain
6260
6361 BaseToolchain custom_toolchain(ToolchainId::Custom, "custom_new_toolchain", "assembler", "c_compiler", "cpp_compiler", "archiver", "linker");
6462
65- // Find all the relevant toolchains on your host system
66- std::vector<fs::path> found_toolchains = custom_toolchain.Find();
63+ // Toolchain::Find similar to previous example
6764
6865 // Find all the relevant toolchains on your host system
6966 // Selects the first found toolchain
7067 // Runs a verification function on the selected toolchain depending on the `ToolchainId`
71- custom_toolchain.Verify();
68+ Toolchain::AddVerificationFunc(ToolchainId::Custom,
69+ [](const ToolchainExecutables & executables) {
70+ // Use executables to get compiler_version and target_arch
71+ if (success) {
72+ ToolchainCompilerInfo info;
73+ info.compiler_version = "compiler_version";
74+ info.target_arch = "target_arch";
75+ return info;
76+ } else {
77+ return {};
78+ }
79+ } -> std::optional<ToolchainCompilerInfo>, "custom_verification_func")
80+
81+ ToolchainVerifyConfig verify_config;
82+ verify_config.verification_identifier = "custom_verification_func";
83+ custom_toolchain.Verify(verify_config);
7284
7385 Specialized Toolchain
7486=====================