Fix Clang detection for Visual Studio 2026 (#20316)
Summary of the issue:
Building from source with scons source fails on Visual Studio 2026 (v18) with
"Could not find the Clang compiler. Perhaps the C++ Clang tools for Windows
component in visual Studio is not installed", even when that component is installed.
The Visual Studio 2026 June update bumped the bundled Clang to version 22 and
reorganized the LLVM layout: the legacy 32-bit VC\Tools\Llvm\bin directory was
dropped, shipping only arch-specific subdirectories (VC\Tools\Llvm\x64\bin,
VC\Tools\Llvm\ARM64\bin). The liblouis sconscript globbed the now-nonexistent
Tools\Llvm\bin path, got an empty result, and raised before compilation.
Description of user facing changes:
None.
Description of developer facing changes:
Building NVDA from source now works with Visual Studio 2026 (June update, Clang 22).
Description of development approach:
Replaced the hard-coded glob of the Visual Studio LLVM install layout with
env.WhereIs("clang-cl"), which probes the environment PATH already populated by
the MSVC tool with the C++ Clang tools directory. This is independent of the LLVM
directory structure, so it works across Visual Studio versions. Removed the now
unused glob and find_vc_pdir imports.