1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
1995-05-04 03:15:53 -07:00
|
|
|
(* Command-line parameters *)
|
|
|
|
|
|
|
|
let objfiles = ref ([] : string list) (* .cmo and .cma files *)
|
2001-10-30 01:32:32 -08:00
|
|
|
and ccobjs = ref ([] : string list) (* .o, .a, .so and -cclib -lxxx *)
|
|
|
|
and dllibs = ref ([] : string list) (* .so and -dllib -lxxx *)
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
let compile_only = ref false (* -c *)
|
2002-06-11 07:15:12 -07:00
|
|
|
and output_name = ref (None : string option) (* -o *)
|
1996-04-29 06:24:35 -07:00
|
|
|
and include_dirs = ref ([] : string list)(* -I *)
|
2002-02-14 07:17:11 -08:00
|
|
|
and no_std_include = ref false (* -nostdlib *)
|
1995-05-04 03:15:53 -07:00
|
|
|
and print_types = ref false (* -i *)
|
|
|
|
and make_archive = ref false (* -a *)
|
1996-11-29 10:36:42 -08:00
|
|
|
and debug = ref false (* -g *)
|
1995-10-09 06:37:11 -07:00
|
|
|
and fast = ref false (* -unsafe *)
|
1995-05-04 03:15:53 -07:00
|
|
|
and link_everything = ref false (* -linkall *)
|
|
|
|
and custom_runtime = ref false (* -custom *)
|
2013-04-18 04:58:59 -07:00
|
|
|
and bytecode_compatible_32 = ref false (* -compat-32 *)
|
1996-11-07 03:01:32 -08:00
|
|
|
and output_c_object = ref false (* -output-obj *)
|
2013-06-05 09:34:40 -07:00
|
|
|
and all_ccopts = ref ([] : string list) (* -ccopt *)
|
2001-09-06 01:52:32 -07:00
|
|
|
and classic = ref false (* -nolabels *)
|
1995-05-04 03:15:53 -07:00
|
|
|
and nopervasives = ref false (* -nopervasives *)
|
1996-04-29 06:24:35 -07:00
|
|
|
and preprocessor = ref(None : string option) (* -pp *)
|
2013-06-05 09:34:40 -07:00
|
|
|
and all_ppx = ref ([] : string list) (* -ppx *)
|
2007-05-16 01:21:41 -07:00
|
|
|
let annotations = ref false (* -annot *)
|
2012-05-30 07:52:37 -07:00
|
|
|
let binary_annotations = ref false (* -annot *)
|
2003-07-17 01:38:28 -07:00
|
|
|
and use_threads = ref false (* -thread *)
|
|
|
|
and use_vmthreads = ref false (* -vmthread *)
|
1997-05-13 11:28:25 -07:00
|
|
|
and noassert = ref false (* -noassert *)
|
1997-05-15 06:30:31 -07:00
|
|
|
and verbose = ref false (* -verbose *)
|
2004-11-02 02:42:58 -08:00
|
|
|
and noprompt = ref false (* -noprompt *)
|
2012-01-27 04:48:15 -08:00
|
|
|
and nopromptcont = ref false (* -nopromptcont *)
|
2005-01-28 09:52:58 -08:00
|
|
|
and init_file = ref (None : string option) (* -init *)
|
2002-02-14 07:17:11 -08:00
|
|
|
and use_prims = ref "" (* -use-prims ... *)
|
|
|
|
and use_runtime = ref "" (* -use-runtime ... *)
|
2002-04-18 00:27:47 -07:00
|
|
|
and principal = ref false (* -principal *)
|
2013-01-29 06:21:12 -08:00
|
|
|
and real_paths = ref true (* -short-paths *)
|
1999-11-08 15:45:01 -08:00
|
|
|
and recursive_types = ref false (* -rectypes *)
|
2009-12-09 01:17:12 -08:00
|
|
|
and strict_sequence = ref false (* -strict-sequence *)
|
2009-07-15 07:06:37 -07:00
|
|
|
and applicative_functors = ref true (* -no-app-funct *)
|
2011-03-17 09:18:05 -07:00
|
|
|
and make_runtime = ref false (* -make-runtime *)
|
1998-08-06 06:27:38 -07:00
|
|
|
and gprofile = ref false (* -p *)
|
2008-12-03 10:09:09 -08:00
|
|
|
and c_compiler = ref (None: string option) (* -cc *)
|
2000-03-09 01:12:28 -08:00
|
|
|
and no_auto_link = ref false (* -noautolink *)
|
2001-08-28 07:47:48 -07:00
|
|
|
and dllpaths = ref ([] : string list) (* -dllpath *)
|
2002-02-08 08:55:44 -08:00
|
|
|
and make_package = ref false (* -pack *)
|
2005-08-01 08:51:09 -07:00
|
|
|
and for_package = ref (None: string option) (* -for-pack *)
|
2011-10-19 22:49:38 -07:00
|
|
|
and error_size = ref 500 (* -error-size *)
|
2012-10-17 09:09:38 -07:00
|
|
|
let dump_source = ref false (* -dsource *)
|
1999-09-08 10:43:13 -07:00
|
|
|
let dump_parsetree = ref false (* -dparsetree *)
|
2012-12-18 09:19:53 -08:00
|
|
|
and dump_typedtree = ref false (* -dtypedtree *)
|
1999-09-08 10:43:13 -07:00
|
|
|
and dump_rawlambda = ref false (* -drawlambda *)
|
1995-12-15 02:21:58 -08:00
|
|
|
and dump_lambda = ref false (* -dlambda *)
|
2012-02-21 09:41:02 -08:00
|
|
|
and dump_clambda = ref false (* -dclambda *)
|
1995-05-04 03:15:53 -07:00
|
|
|
and dump_instr = ref false (* -dinstr *)
|
1995-05-22 04:58:51 -07:00
|
|
|
|
1995-07-20 00:52:12 -07:00
|
|
|
let keep_asm_file = ref false (* -S *)
|
1995-07-13 10:17:20 -07:00
|
|
|
let optimize_for_speed = ref true (* -compact *)
|
1995-07-02 09:50:39 -07:00
|
|
|
|
|
|
|
and dump_cmm = ref false (* -dcmm *)
|
|
|
|
let dump_selection = ref false (* -dsel *)
|
|
|
|
let dump_live = ref false (* -dlive *)
|
|
|
|
let dump_spill = ref false (* -dspill *)
|
|
|
|
let dump_split = ref false (* -dsplit *)
|
|
|
|
let dump_interf = ref false (* -dinterf *)
|
|
|
|
let dump_prefer = ref false (* -dprefer *)
|
|
|
|
let dump_regalloc = ref false (* -dalloc *)
|
|
|
|
let dump_reload = ref false (* -dreload *)
|
1995-08-13 02:31:50 -07:00
|
|
|
let dump_scheduling = ref false (* -dscheduling *)
|
1995-07-02 09:50:39 -07:00
|
|
|
let dump_linear = ref false (* -dlinear *)
|
1995-07-10 02:48:27 -07:00
|
|
|
let keep_startup_file = ref false (* -dstartup *)
|
1999-05-15 08:10:00 -07:00
|
|
|
let dump_combine = ref false (* -dcombine *)
|
1996-10-22 06:37:20 -07:00
|
|
|
|
|
|
|
let native_code = ref false (* set to true under ocamlopt *)
|
1997-02-16 09:20:11 -08:00
|
|
|
let inline_threshold = ref 10
|
2013-06-05 09:34:40 -07:00
|
|
|
let force_slash = ref false (* for ocamldep *)
|
2000-10-02 07:18:05 -07:00
|
|
|
|
2002-06-07 01:03:46 -07:00
|
|
|
let dont_write_files = ref false (* set to true under ocamldoc *)
|
2002-02-14 07:17:11 -08:00
|
|
|
|
|
|
|
let std_include_flag prefix =
|
|
|
|
if !no_std_include then ""
|
|
|
|
else (prefix ^ (Filename.quote Config.standard_library))
|
|
|
|
;;
|
|
|
|
|
|
|
|
let std_include_dir () =
|
|
|
|
if !no_std_include then [] else [Config.standard_library]
|
|
|
|
;;
|
2007-11-06 07:16:56 -08:00
|
|
|
|
|
|
|
let shared = ref false (* -shared *)
|
2008-07-15 08:31:32 -07:00
|
|
|
let dlcode = ref true (* not -nodynlink *)
|
2011-03-17 09:18:05 -07:00
|
|
|
|
2013-06-03 11:03:59 -07:00
|
|
|
let runtime_variant = ref "";; (* -runtime-variant *)
|
|
|
|
|