[Sharing progress] Tried to revive LLVM/Clang/Libc++ pkgs and port Rust

William Hu purplearmadillo77@proton.me
Wed Aug 30 02:18:56 GMT 2023


Hi All,

Re OCaml compilers: I should be able to package OCaml 4.14.1 (and hopefully an 
alpha version of 5.1.0 as well) for Cygwin in the coming weeks. OCaml 5.0.0 
temporarily dropped Cygwin support so the Cygwin versions will of course skip 
that release.

On Saturday, August 26th, 2023 at 3:40 PM, ASSI wrote:
> + ocaml_config imports stupid flags from the cygport build
> + probably from /usr/lib/ocaml/Makefile.config

Just checked the file and I agree that CFLAGS looks a little funny - are there any 
other stupid flags/variables that you had in mind?

> I can get to that point with a bootstrap build or even a fully
> configured one with opam. If I could figure out how to get opam to
> actually install into the system and not this bloody unexplained thing
> that it calls "switches" (which are maybe a totally cool thing, but I
> neither need nor want them) I could likely bootstrap the whole thing and
> get the packages rebuilt that the OCaml LLVM bindings need.

Re Opam switches: As far as I understand, switches are like "git branch" but for 
different compiler installations instead of different code branches; for example 
you can install ocaml 4.14.0 and 4.12.0 side by side and switch between them 
easily. In addition to some other things, it effectively edits your PATH 
environment variable so when you type "ocamlc" it'll execute the appropriate version.

General comment: I don't know much about LLVM, but is there a reason why the 
other software (dune, ocamlbuild, etc.) must be installed with the system and 
not with opam?

> Cygport package changes are in the Cygwin Packages Git repository in the
> respective playground branch as before.

Re OCaml cygport playground: Thanks for the cygport cleanup and changes.
A couple questions:

src_compile:
1. Adding flambda to a default system installation of OCaml can slow down 
compile times and produce linking incompatibilities with non-flambda code [1]. 
Additionally, there may be value in a vanilla out-of-the-box OCaml distribution.
Let me know if there is some general Cygwin guidance on what features packaged 
language compilers should support. Otherwise, if flambda is necessary for LLVM, 
I could package an flambda and a non-flambda release for each version, and the 
user can pick which one they prefer.

2. What benefit does splitting "cygmake" into the 3-step "cygmake world, opt, 
opt.opt" have? Plain old "make/cygmake" with no target appears to be the 
recommended compilation step.

src_test:
1. I believe "make ocamltest" does not run the testsuite; AFAIU, it builds the 
auxiliary testing software instead. So far the only ways I know of to run the 
testsuite are either "make tests" or cd'ing into the testsuite directory and 
running "make all" (the old method).

Thanks,
William

[1] https://v2.ocaml.org/manual/flambda.html





More information about the Cygwin-apps mailing list