Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msvc-tools and OCaml/OPAM #2

Closed
db4 opened this issue Apr 24, 2018 · 2 comments · Fixed by #18
Closed

msvc-tools and OCaml/OPAM #2

db4 opened this issue Apr 24, 2018 · 2 comments · Fixed by #18

Comments

@db4
Copy link

db4 commented Apr 24, 2018

OPAM Makefile now has OCAML_PORT=msvc option that auto-detects Visual Studio and bootstrap working ((in theory) OCaml compiler. As an OCaml contributor, do you have any plans to integrate msvs-tools directly into OPAM and/or OCaml compiler build? So that one could write ./msvs-detect --arch=x86 somewhere in .comp compiler specification file and then do opam switch knowing that OPAM itself will set the necessary Visual Studio environment?

@dra27
Copy link
Contributor

dra27 commented Apr 26, 2018

Yes, that's indeed planned (in fact, prototyped). With some additional changes based on ocaml/opam#2930, you can say things like:

opam switch 4.06.1-msvc64 ocaml-base-compiler.4.06.1 --arch=x86_64 --cc=cl

from an empty command prompt, and opam automatically uses msvs-detect to set-up the Microsoft C Compiler environment. When you switch to that switch, it automatically includes it via a proposed compiler package (see dra27/opam-repository@1ee6101).

I demonstrated this at ICFP last year, but it's not in a particularly usable state at the moment, as I've been rebasing and upstreaming, but I'm hoping to have a demonstrable version of it again soon!

@db4
Copy link
Author

db4 commented Apr 27, 2018

I see. Thanks a lot for you work!

@dra27 dra27 linked a pull request Mar 8, 2024 that will close this issue
@dra27 dra27 closed this as completed in #18 Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants