Skip to content

Commit 0ec4a7e

Browse files
committed
Update list of wrappers.
1 parent d58b3c4 commit 0ec4a7e

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[])
@@ -978,16 +987,21 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
978987

979988
# Generate OCaml stuff
980989
if :ocaml in compilers
981-
write_wrapper(ocamlc, p, "$(t)-ocamlc.opt")
982-
write_wrapper(ocamlopt, p, "$(t)-ocamlopt.opt")
990+
write_wrapper(ocaml, p, "$(t)-ocaml")
991+
write_wrapper(ocamldep, p, "$(t)-ocamldep")
992+
write_wrapper(ocamlc, p, "$(t)-ocamlc")
993+
write_wrapper(ocamlopt, p, "$(t)-ocamlopt")
994+
write_wrapper(ocamlrun, p, "$(t)-ocamlrun")
995+
write_wrapper(ocamlyacc, p, "$(t)-ocamlyacc")
996+
write_wrapper(ocamllex, p, "$(t)-ocamllex")
983997

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

9881002
write_wrapper(dune, p, "$(t)-dune")
9891003
write_wrapper(ocamlbuild, p, "$(t)-ocamlbuild")
990-
write_wrapper(opam, p, "$(t)-opam")
1004+
write_wrapper(ocamlfind, p, "$(t)-ocamlfind")
9911005
end
9921006

9931007
# Generate go stuff
@@ -1037,11 +1051,11 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
10371051
append!(default_tools, ("rustc","rustup","cargo"))
10381052
end
10391053
if :ocaml in compilers
1040-
append!(default_tools, ("ocamlc.opt", "ocamlopt.opt"))
1054+
append!(default_tools, ("ocaml", "ocamldep", "ocamlc", "ocamlopt", "ocamlrun", "ocamlyacc", "ocamllex"))
10411055
if Sys.iswindows(platform)
10421056
push!(default_tools, "flexlink")
10431057
end
1044-
append!(default_tools, ("dune", "ocamlbuild", "opam"))
1058+
append!(default_tools, ("dune", "ocamlbuild", "ocamlfind"))
10451059
end
10461060
if :go in compilers
10471061
append!(default_tools, ("go", "gofmt"))

0 commit comments

Comments
 (0)