From 5537b3d60e372a672d8e760bfb999b2fd698140d Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 11 Jun 2026 16:10:03 -0400 Subject: [PATCH] Clang-FindBinUtils: find unprefixed `clang-scan-deps` binaries as well Apparently Gentoo (and upstream builds) do not add prefixes to the associated tools. Alas, such things exist, so we should support them. Fixes: #27858 --- Modules/Compiler/Clang-FindBinUtils.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/Compiler/Clang-FindBinUtils.cmake b/Modules/Compiler/Clang-FindBinUtils.cmake index f4f35e63be..48195e2a6c 100644 --- a/Modules/Compiler/Clang-FindBinUtils.cmake +++ b/Modules/Compiler/Clang-FindBinUtils.cmake @@ -52,6 +52,12 @@ find_program(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_CLANG_SCAN_DEPS NAMES "${_CMAKE_TOOLCHAIN_PREFIX}clang-scan-deps-${__version_x}" "${_CMAKE_TOOLCHAIN_PREFIX}clang-scan-deps${__version_x}" "${_CMAKE_TOOLCHAIN_PREFIX}clang-scan-deps" + # Gentoo, at least, installs associated tools without the prefix. Upstream + # builds also seem to not add toolchain prefixes to `clang-scan-deps`. + "clang-scan-deps-${__version_x_y}" + "clang-scan-deps-${__version_x}" + "clang-scan-deps${__version_x}" + "clang-scan-deps" HINTS ${__clang_hints} NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH DOC "`clang-scan-deps` dependency scanner"