Skip to content
  • Gregory Mitrano's avatar
    Clang: Fall back to llvm-rc when rc is unavailable · cea253a3
    Gregory Mitrano authored
    This change modifies how CMAKE_RC_COMPILER is configured to improve
    the out-of-box experience for developers using Clang on Windows.
    The previous behavior was to require the user to explicitly specify
    the resource compiler when CMake was called. The new behavior
    is to automatically attempt to locate the MSVC rc binary and use that
    if it's found. If rc is not available, CMake will now fall back to
    Clang's llvm-rc binary.
    
    With this change in place, trivial C/C++ programs can be generated
    with Ninja and Clang on Windows without running into errors about
    a missing resource compiler.
    
    Fixes: #19318
    cea253a3