setup-ocaml icon indicating copy to clipboard operation
setup-ocaml copied to clipboard

MSVC / clang-cl support

Open MisterDA opened this issue 9 months ago • 2 comments

Hi! It would be nice if we could use the action with the MSVC / clang-cl port, restored in OCaml 5.3. The system-msvc opam package and the ilammy/msvc-dev-cmd action might help. clang-cl is a drop-in replacement for cl.exe that's also installed in the GitHub workers. It's not clear if it would be easy to come up with a user-facing switch to use it. Maybe users could be allowed to set the CC env var?

MisterDA avatar Mar 13 '25 15:03 MisterDA

Thanks for your suggestion! I think adding a few clear examples to the existing EXAMPLES.md document should be sufficient to illustrate this use case. If users can follow a straightforward example or two, it should provide the necessary guidance without complicating things further.

smorimoto avatar Mar 13 '25 22:03 smorimoto

I'm not sure examples are sufficient. Something that could help: how would you go about selecting another C compiler to build OCaml with setup-ocaml? Suppose you're on ubuntu-latest, but you'd rather use clang of GCC. How would you pass CC=clang to OCaml's configure script?

MisterDA avatar Apr 07 '25 15:04 MisterDA