From 29a92bd6aa25b33b21e573e5661e0a00c9012dab Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Fri, 10 Jan 2025 15:16:15 +0100 Subject: [PATCH] tool: Add `is_like_clang_cl()` getter (#1357) --- src/tool.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tool.rs b/src/tool.rs index ad606060..af43a918 100644 --- a/src/tool.rs +++ b/src/tool.rs @@ -421,6 +421,11 @@ impl Tool { matches!(self.family, ToolFamily::Msvc { .. }) } + /// Whether the tool is `clang-cl`-based MSVC-like. + pub fn is_like_clang_cl(&self) -> bool { + matches!(self.family, ToolFamily::Msvc { clang_cl: true }) + } + /// Supports using `--` delimiter to separate arguments and path to source files. pub(crate) fn supports_path_delimiter(&self) -> bool { matches!(