Skip to content

Commit 6dfed70

Browse files
committed
Update list of wrappers.
1 parent e3361c6 commit 6dfed70

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

src/Runner.jl

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -733,12 +733,21 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
733733
function ocaml_wrapper(io::IO, tool::String, p::AbstractPlatform)
734734
return wrapper(io, "/opt/$(aatriplet(p))/bin/$(tool)")
735735
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)
738740
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)
742751

743752
# Rust stuff
744753
function rust_flags!(p::AbstractPlatform, flags::Vector{String} = String[])
@@ -979,16 +988,21 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
979988

980989
# Generate OCaml stuff
981990
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")
984998

985999
if Sys.iswindows(p)
9861000
write_wrapper(flexlink, p, "$(t)-flexlink")
9871001
end
9881002

9891003
write_wrapper(dune, p, "$(t)-dune")
9901004
write_wrapper(ocamlbuild, p, "$(t)-ocamlbuild")
991-
write_wrapper(opam, p, "$(t)-opam")
1005+
write_wrapper(ocamlfind, p, "$(t)-ocamlfind")
9921006
end
9931007

9941008
# Generate go stuff
@@ -1038,11 +1052,11 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
10381052
append!(default_tools, ("rustc","rustup","cargo"))
10391053
end
10401054
if :ocaml in compilers
1041-
append!(default_tools, ("ocamlc.opt", "ocamlopt.opt"))
1055+
append!(default_tools, ("ocaml", "ocamldep", "ocamlc", "ocamlopt", "ocamlrun", "ocamlyacc", "ocamllex"))
10421056
if Sys.iswindows(platform)
10431057
push!(default_tools, "flexlink")
10441058
end
1045-
append!(default_tools, ("dune", "ocamlbuild", "opam"))
1059+
append!(default_tools, ("dune", "ocamlbuild", "ocamlfind"))
10461060
end
10471061
if :go in compilers
10481062
append!(default_tools, ("go", "gofmt"))

0 commit comments

Comments
 (0)