diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-23 17:38:54 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-10-23 17:38:54 +0200 |
commit | 94163429293cef7410320f79fc5964fc546fccef (patch) | |
tree | 085714716026db33b4f99e7f75595c6b22233c8a /driver/Driver.ml | |
parent | 1cb3d93ff278ebbd0c6967c5f9401a97f9b618b4 (diff) | |
download | compcert-94163429293cef7410320f79fc5964fc546fccef.tar.gz compcert-94163429293cef7410320f79fc5964fc546fccef.zip |
Added additional option for the renaming of the suffix of the sdump
file.
The new option -sdump-suffix allows it to specify another suffix
for the sdump file.
Bug 17326
Diffstat (limited to 'driver/Driver.ml')
-rw-r--r-- | driver/Driver.ml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/driver/Driver.ml b/driver/Driver.ml index 8fe6b07d..a0d742c2 100644 --- a/driver/Driver.ml +++ b/driver/Driver.ml @@ -20,6 +20,9 @@ open Timing let stdlib_path = ref Configuration.stdlib_path +(* Optional sdump suffix *) +let sdump_suffix = ref ".json" + (* Invocation of external tools *) let command ?stdout args = @@ -180,7 +183,7 @@ let compile_c_ast sourcename csyntax ofile debug = exit 2 in (* Dump Asm in binary and JSON format *) if !option_sdump then - dump_jasm asm (output_filename sourcename ".c" ".json"); + dump_jasm asm (output_filename sourcename ".c" !sdump_suffix); (* Print Asm in text form *) let oc = open_out ofile in PrintAsm.print_program oc asm debug; @@ -470,7 +473,7 @@ Tracing options: -dltl Save LTL after register allocation in <file>.ltl -dmach Save generated Mach code in <file>.mach -dasm Save generated assembly in <file>.s - -sdump Save info for post-linking validation in <file>.sdump + -sdump Save info for post-linking validation in <file>.json General options: -stdlib <dir> Set the path of the Compcert run-time library -v Print external commands before invoking them @@ -581,6 +584,7 @@ let cmdline_actions = Exact "-dmach", Set option_dmach; Exact "-dasm", Set option_dasm; Exact "-sdump", Set option_sdump; + Exact "-sdump-suffix", String (fun s -> option_sdump := true; sdump_suffix:= s); (* General options *) Exact "-v", Set option_v; Exact "-stdlib", String(fun s -> stdlib_path := s); |