Module Driver.Flags

General compiler settings.

type t = {
  1. optimization_level : Analysis_and_optimization.Optimize.optimization_level;
  2. allow_undefined : bool;
  3. functions_only : bool;
  4. standalone_functions : bool;
  5. use_opencl : bool;
  6. include_source : Frontend.Include_files.t;
  7. info : bool;
  8. version : bool;
  9. auto_format : bool;
  10. debug_settings : debug_settings;
  11. line_length : int;
  12. canonicalizer_settings : Frontend.Canonicalize.canonicalizer_settings;
  13. warn_pedantic : bool;
  14. warn_uninitialized : bool;
  15. filename_in_msg : string option;
}
and debug_settings = {
  1. print_ast : bool;
  2. print_typed_ast : bool;
  3. print_mir : debug_options;
  4. print_transformed_mir : debug_options;
  5. print_optimized_mir : debug_options;
  6. print_mem_patterns : bool;
  7. force_soa : bool option;
    (*

    if None, do nothing. If Some true, force on, if Some false, force off

    *)
  8. print_lir : bool;
  9. debug_generate_data : bool;
  10. debug_generate_inits : bool;
  11. debug_data_json : string option;
}

Settings mainly for developers, not users

and debug_options =
  1. | Off
  2. | Basic
  3. | Pretty
val default : t
val set_backend_args_list : string list -> unit

This is a helper function to set the model_compile_info method of the generated C++ to contain a copy of the (relevant) compiler flags

val remove_dotstan : string -> string

Strip '.stan' or '.stanfunctions' from a filename