Skip to content

clang-cl support #1073

@smorimoto

Description

@smorimoto

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-detectconf-msvc64ocaml-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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions