@@ -733,12 +733,21 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
733
733
function ocaml_wrapper (io:: IO , tool:: String , p:: AbstractPlatform )
734
734
return wrapper (io, " /opt/$(aatriplet (p)) /bin/$(tool) " )
735
735
end
736
- ocamlc (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlc.opt" , p)
737
- ocamlopt (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlopt.opt" , p)
736
+ # # cross-tools for the target
737
+ ocamlc (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlc" , p)
738
+ ocamlopt (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlopt" , p)
739
+ ocamldep (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamldep" , p)
738
740
flexlink (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " flexlink" , p)
739
- dune (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " dune" , p)
740
- ocamlbuild (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlbuild" , p)
741
- opam (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " opam" , p)
741
+ ocamllex (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamllex" , p)
742
+ # XXX : ocamlyacc not being a cross tool seems like a bug?
743
+ ocamlyacc (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlyacc" , host_platform)
744
+ # # native parts of the toolchain
745
+ ocaml (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocaml" , host_platform)
746
+ ocamlrun (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlrun" , host_platform)
747
+ # # auxiliary tools that are only built for the host
748
+ dune (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " dune" , host_platform)
749
+ ocamlbuild (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlbuild" , host_platform)
750
+ ocamlfind (io:: IO , p:: AbstractPlatform ) = ocaml_wrapper (io, " ocamlfind" , host_platform)
742
751
743
752
# Rust stuff
744
753
function rust_flags! (p:: AbstractPlatform , flags:: Vector{String} = String[])
@@ -979,16 +988,21 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
979
988
980
989
# Generate OCaml stuff
981
990
if :ocaml in compilers
982
- write_wrapper (ocamlc, p, " $(t) -ocamlc.opt" )
983
- write_wrapper (ocamlopt, p, " $(t) -ocamlopt.opt" )
991
+ write_wrapper (ocaml, p, " $(t) -ocaml" )
992
+ write_wrapper (ocamldep, p, " $(t) -ocamldep" )
993
+ write_wrapper (ocamlc, p, " $(t) -ocamlc" )
994
+ write_wrapper (ocamlopt, p, " $(t) -ocamlopt" )
995
+ write_wrapper (ocamlrun, p, " $(t) -ocamlrun" )
996
+ write_wrapper (ocamlyacc, p, " $(t) -ocamlyacc" )
997
+ write_wrapper (ocamllex, p, " $(t) -ocamllex" )
984
998
985
999
if Sys. iswindows (p)
986
1000
write_wrapper (flexlink, p, " $(t) -flexlink" )
987
1001
end
988
1002
989
1003
write_wrapper (dune, p, " $(t) -dune" )
990
1004
write_wrapper (ocamlbuild, p, " $(t) -ocamlbuild" )
991
- write_wrapper (opam , p, " $(t) -opam " )
1005
+ write_wrapper (ocamlfind , p, " $(t) -ocamlfind " )
992
1006
end
993
1007
994
1008
# Generate go stuff
@@ -1038,11 +1052,11 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
1038
1052
append! (default_tools, (" rustc" ," rustup" ," cargo" ))
1039
1053
end
1040
1054
if :ocaml in compilers
1041
- append! (default_tools, (" ocamlc.opt " , " ocamlopt.opt " ))
1055
+ append! (default_tools, (" ocaml " , " ocamldep " , " ocamlc" , " ocamlopt" , " ocamlrun " , " ocamlyacc " , " ocamllex " ))
1042
1056
if Sys. iswindows (platform)
1043
1057
push! (default_tools, " flexlink" )
1044
1058
end
1045
- append! (default_tools, (" dune" , " ocamlbuild" , " opam " ))
1059
+ append! (default_tools, (" dune" , " ocamlbuild" , " ocamlfind " ))
1046
1060
end
1047
1061
if :go in compilers
1048
1062
append! (default_tools, (" go" , " gofmt" ))
0 commit comments