Skip to content

Commit

Permalink
Initialize CIL after initializing CIL options
Browse files Browse the repository at this point in the history
initCIL already depends on theMachine, but it overwrites it. Must use envMachine to select it based on exp.architecture beforehand.
  • Loading branch information
sim642 committed Sep 24, 2024
1 parent 917cf7e commit 84e738b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/common/util/cilfacade.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,10 @@ let init_options () =
Cabs2cil.addNestedScopeAttr := get_bool "cil.addNestedScopeAttr";

if get_bool "ana.sv-comp.enabled" then (
let machine = match get_string "exp.architecture" with
Cil.envMachine := match get_string "exp.architecture" with
| "32bit" -> Machdep.gcc32
| "64bit" -> Machdep.gcc64
| _ -> assert false
in
Machdep.theMachine := Option.get machine
)

let init () =
Expand Down
2 changes: 1 addition & 1 deletion src/goblint.ml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ open Maingoblint
(** the main function *)
let main () =
try
Cilfacade.init ();
Maingoblint.parse_arguments ();
Cilfacade.init ();

(* Timing. *)
Maingoblint.reset_stats ();
Expand Down

0 comments on commit 84e738b

Please sign in to comment.