summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2019-03-18 09:11:36 +0100
committerGitHub <noreply@github.com>2019-03-18 09:11:36 +0100
commitc5efbb42a480f8fb7625070d2c0749c7ea7abf20 (patch)
treeecb9fa8c125df064962901f7b786d30c5ea7c2ef /tools
parent798dc35c9e61bfa70e5332325519b938888e6cb0 (diff)
downloadocaml-c5efbb42a480f8fb7625070d2c0749c7ea7abf20.tar.gz
MPR#3249: ocamlmklib does not support .cmxa files as arguments (#8512)
That's because ocamlopt -a doesn't support .cmxa files as arguments. It is better to reject those files in ocamlmklib than later. The manual never said that ocamlmklib accepts .cmxa files. Closes: #3249
Diffstat (limited to 'tools')
-rw-r--r--tools/ocamlmklib.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/ocamlmklib.ml b/tools/ocamlmklib.ml
index b5c0aee539..d5bb84cac8 100644
--- a/tools/ocamlmklib.ml
+++ b/tools/ocamlmklib.ml
@@ -37,7 +37,7 @@ let compiler_path name =
if Sys.os_type = "Win32" then name else Filename.concat bindir name
let bytecode_objs = ref [] (* .cmo,.cma,.ml,.mli files to pass to ocamlc *)
-and native_objs = ref [] (* .cmx,.cmxa,.ml,.mli files to pass to ocamlopt *)
+and native_objs = ref [] (* .cmx,.ml,.mli files to pass to ocamlopt *)
and c_objs = ref [] (* .o, .a, .obj, .lib, .dll, .dylib, .so files to
pass to mksharedlib and ar *)
and caml_libs = ref [] (* -cclib to pass to ocamlc, ocamlopt *)
@@ -99,7 +99,7 @@ let parse_arguments argv =
push_args ~first:0 (Arg.read_arg0 (next_arg s))
else if ends_with s ".cmo" || ends_with s ".cma" then
bytecode_objs := s :: !bytecode_objs
- else if ends_with s ".cmx" || ends_with s ".cmxa" then
+ else if ends_with s ".cmx" then
native_objs := s :: !native_objs
else if ends_with s ".ml" || ends_with s ".mli" then
(bytecode_objs := s :: !bytecode_objs;
@@ -188,7 +188,7 @@ let parse_arguments argv =
if !output_c = "" then output_c := !output
let usage = "\
-Usage: ocamlmklib [options] <.cmo|.cma|.cmx|.cmxa|.ml|.mli|.o|.a|.obj|.lib|\
+Usage: ocamlmklib [options] <.cmo|.cma|.cmx|.ml|.mli|.o|.a|.obj|.lib|\
.dll|.dylib files>\
\nOptions are:\
\n -args <file> Read additional newline-terminated command line arguments\