Add clang-cl as a compiler option on Windows. clang-cl is a drop-in replacement for cl.exe that uses LLVM/Clang with an MSVC-compatible interface, and is pre-installed on GitHub-hosted runners as part of the Visual Studio LLVM toolset (VC.Llvm.Clang).
Unlike MSVC which is cleanly handled by opam through the msvs-detect → conf-msvc64 → ocaml-env-msvc64 chain, there is currently no opam-level mechanism for clang-cl. Setting CC=clang-cl globally in setup-ocaml would affect all package builds, not just the OCaml compiler itself.
This is blocked on upstream opam support — a system-clang-cl package or an option package that scopes CC=clang-cl to the opam build environment would be the proper approach. See discussion in #950 (#950 (comment)).
Related: #950
Add
clang-clas a compiler option on Windows.clang-clis a drop-in replacement forcl.exethat uses LLVM/Clang with an MSVC-compatible interface, and is pre-installed on GitHub-hosted runners as part of the Visual Studio LLVM toolset (VC.Llvm.Clang).Unlike MSVC which is cleanly handled by opam through the
msvs-detect→conf-msvc64→ocaml-env-msvc64chain, there is currently no opam-level mechanism forclang-cl. SettingCC=clang-clglobally in setup-ocaml would affect all package builds, not just the OCaml compiler itself.This is blocked on upstream opam support — a
system-clang-clpackage or an option package that scopesCC=clang-clto the opam build environment would be the proper approach. See discussion in #950 (#950 (comment)).Related: #950