forked from cil-project/cil
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #173 from goblint/machdep-arch
Generate 32bit and 64bit `Machdep` if possible
- Loading branch information
Showing
4 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module C = Configurator.V1 | ||
|
||
let () = | ||
let real_gcc = ref "" in | ||
let m = ref "" in | ||
let args = Arg.[ | ||
("--real-gcc", Set_string real_gcc, ""); | ||
("-m", Set_string m, ""); | ||
] | ||
in | ||
C.main ~name:"model" ~args (fun c -> | ||
let exe = "./machdep" ^ !m ^ "-ml.exe" in | ||
let {C.Process.exit_code; stdout; stderr} = C.Process.run c !real_gcc ["-D_GNUCC"; "-m" ^ !m; "machdep-ml.c"; "-o"; exe] in | ||
if exit_code = 0 then ( | ||
let {C.Process.stdout; stderr; exit_code} = C.Process.run c exe [] in | ||
assert (exit_code = 0); | ||
Printf.printf "Some {%s}" stdout | ||
) | ||
else | ||
Printf.printf "None" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters