1
(**************************************************************************)
3
(* This file is part of Frama-C. *)
5
(* Copyright (C) 2007-2008 *)
6
(* CEA (Commissariat � l'�nergie Atomique) *)
8
(* you can redistribute it and/or modify it under the terms of the GNU *)
9
(* Lesser General Public License as published by the Free Software *)
10
(* Foundation, version 2.1. *)
12
(* It is distributed in the hope that it will be useful, *)
13
(* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
14
(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
15
(* GNU Lesser General Public License for more details. *)
17
(* See the GNU Lesser General Public License version 2.1 *)
18
(* for more details (enclosed in the file licenses/LGPLv2.1). *)
20
(**************************************************************************)
22
(* $Id: boot.ml,v 1.33 2008/11/18 12:13:41 uid568 Exp $ *)
24
(** Frama-C Entry Point (last linked module).
25
@plugin development guide *)
27
(* ************************************************************************* *)
28
(** Registering options for debugging project *)
29
(* ************************************************************************* *)
31
let dump_dependencies () =
33
Project.Selection.remove Cmdline.Machdep.self
34
(Project.Selection.remove Cmdline.MainFunction.self
35
(Project.Selection.remove Cmdline.LibEntry.self
36
(Cmdline.get_selection ())))
38
Project.Computation.dump_dependencies (*~except*)
39
"computation_dependencies.dot"
43
Arg.Int Project.set_debug_level,
44
"Level of debug for project";
46
"-dump", Arg.Unit dump_dependencies, "Dump dependencies" ]
48
let () = Options.add_cmdline ~name:"project" ~debug:project_debug []
53
~name:"journalization"
55
Arg.Unit Cmdline.Journal.Disable.on,
56
": do not output any journal";
58
Arg.String Cmdline.Journal.Name.set,
59
": set the filename of the journal (do not write any extension)";
62
(* ************************************************************************* *)
63
(** Adding some internal state dependencies *)
64
(* ************************************************************************* *)
67
Project.Computation.add_dependency Alarms.self Db.Value.self;
68
Binary_cache.MemoryFootprint.depend Cmdline.MemoryFootprint.self;
69
Buckx.MemoryFootprint.depend Cmdline.MemoryFootprint.self;
72
[ Cmdline.SimplifyCfg.self;
73
Cmdline.KeepSwitch.self;
74
Cmdline.UnrollingLevel.self;
75
Cmdline.Constfold.self;
76
Cmdline.ReadAnnot.self;
77
Cmdline.PreprocessAnnot.self ]
79
(* ************************************************************************* *)
80
(** Booting Frama-C *)
81
(* ************************************************************************* *)
83
(* Customisation of non-projectified CIL parameters.
84
(projectified CIL parameters must be initialised with {!Cil.initCIL}). *)
86
Cabs2cil.forceRLArgEval := false;
87
Cil.miscState.Cil.lineDirectiveStyle <- None;
88
(* Cil.lineDirectiveStyle := Some LinePreprocessorInput;*)
89
Cil.miscState.Cil.printCilAsIs <- Cmdline.Debug.get () > 0;
90
Mergecil.ignore_merge_conflicts := true;
91
Pretty.flushOften := true
95
File.cxx_suffixes := Db.Cxx.suffixes;
96
Kind.version := Version.version;
99
!Dynamic.include_all_module ();
101
at_exit Journal.write;
102
Options.parse_cmdline ();
103
if Cmdline.Journal.Disable.get () then begin
104
Journal.clear ~restart:false ();
107
if Cmdline.Journal.Name.is_set () then
108
Journal.set_name (Cmdline.Journal.Name.get ());
109
Options.initialize_toplevels ()
113
compile-command: "LC_ALL=C make -C ../.. -j"