Skip to main content

select_tool

Function select_tool 

Source
pub fn select_tool(
    tool: Tool,
    llvm: &[LlvmTool],
    host: HostOs,
) -> Result<LlvmChoice, ToolchainError>
Expand description

The copy of tool to use among those detected (toolchain.md, “LLVM (clang / clang-cl / clang-format / clang-tidy)”): the one written in [toolchain.paths] when there is one, which must be eligible, or else the newest eligible copy; among equals, the first in search order. Eligible is a release that ran, and for clang and clang-cl on Windows one targeting MSVC; clang-format and clang-tidy have no target to check (clang-tidy prints none), and must be at least TOOL_MINIMUM; the compilers’ minimum and [toolchain.version] are the compiler selection’s.