diff options
Diffstat (limited to 'driver/main.ml')
-rw-r--r-- | driver/main.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/driver/main.ml b/driver/main.ml index 8c90134542..786ee8f5c1 100644 --- a/driver/main.ml +++ b/driver/main.ml @@ -97,7 +97,7 @@ module Options = Main_args.Make_options (struct let _a = set make_archive let _annot = set annotations let _c = set compile_only - let _cc s = c_compiler := s + let _cc s = c_compiler := Some s let _cclib s = ccobjs := Misc.rev_split_words s @ !ccobjs let _ccopt s = ccopts := s :: !ccopts let _config = show_config @@ -164,9 +164,13 @@ let main () = Arg.parse Options.list anonymous usage; if List.length (List.filter (fun x -> !x) - [make_archive;make_package;compile_only;output_c_object]) > 1 + [make_archive;make_package;compile_only;output_c_object]) + > 1 then - fatal "Please specify at most one of -pack, -a, -c, -output-obj"; + if !print_types then + fatal "Option -i is incompatible with -pack, -a, -output-obj" + else + fatal "Please specify at most one of -pack, -a, -c, -output-obj"; if !make_archive then begin Compile.init_path(); |