summaryrefslogtreecommitdiff
path: root/driver/main.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2016-10-12 09:30:54 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2016-10-12 09:30:54 +0200
commit62335624a95891a030c27fa30ec0764cceea64ce (patch)
treecb318b3cf2c3d69a4d7ed910b51f3095841efad7 /driver/main.ml
parentbfd7e12dff0d53875ba9af69bc8f60ecb7da261f (diff)
downloadocaml-62335624a95891a030c27fa30ec0764cceea64ce.tar.gz
Added simple parse_expand and support ocamldep
The parse_expand function does the same as parse and parse_dynamic but allows Expand. However it does not update current to avoid the problem that the array is modified. This function is used for the ocamlopt, ocamlc, ocamlcp, ocamloptp and ocamldep.
Diffstat (limited to 'driver/main.ml')
-rw-r--r--driver/main.ml4
1 files changed, 1 insertions, 3 deletions
diff --git a/driver/main.ml b/driver/main.ml
index 7ef20a3bf0..c68a2e98aa 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -182,9 +182,7 @@ end)
let main () =
try
readenv ppf Before_args;
- let argv = ref Sys.argv in
- let spec = ref Options.list in
- Arg.parse_and_expand_argv_dynamic Arg.current argv spec anonymous usage;
+ Arg.parse_expand Options.list anonymous usage;
if !output_name <> None && !compile_only &&
List.length !process_thunks > 1 then
fatal "Options -c -o are incompatible with compiling multiple files";