diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2020-07-08 16:51:22 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2020-07-08 16:51:22 +0200 |
commit | 430263226793599834da40a39b2f82565338bd70 (patch) | |
tree | 97050987f1c1afc5a18cd328d93ee95e566a76d0 /driver/CommonOptions.ml | |
parent | 1a01ad629109cdb60fddae3787e3a589d20e9790 (diff) | |
download | compcert-kvx-430263226793599834da40a39b2f82565338bd70.tar.gz compcert-kvx-430263226793599834da40a39b2f82565338bd70.zip |
Revert "Use the same version string."
This reverts commit 1a01ad629109cdb60fddae3787e3a589d20e9790.
Diffstat (limited to 'driver/CommonOptions.ml')
-rw-r--r-- | driver/CommonOptions.ml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/driver/CommonOptions.ml b/driver/CommonOptions.ml index e0e75e58..a2f249c1 100644 --- a/driver/CommonOptions.ml +++ b/driver/CommonOptions.ml @@ -16,7 +16,7 @@ open Commandline (* The version string for [tool_name] *) let version_string tool_name = if Version.buildnr <> "" && Version.tag <> "" && Version.branch <> "" then - Printf.sprintf "The CompCert %s\nVersion: %s\nBuild: %s\nTag: %s\nBranch: %s\n" + Printf.sprintf "The CompCert %s, Release: %s, Build: %s, Tag: %s, Branch %s\n" tool_name Version.version Version.buildnr Version.tag Version.branch else Printf.sprintf "The CompCert %s, version %s\n" tool_name Version.version @@ -25,10 +25,16 @@ let version_string tool_name = let print_version_and_exit tool_name () = Printf.printf "%s" (version_string tool_name); exit 0 -(* Print the version string to a file and exit the program *) +let version_file_string tool_name = + if Version.buildnr <> "" && Version.tag <> "" then + Printf.sprintf "This is CompCert %s,\nVersion: %s,\nBuild: %s,\nTag: %s,\nBranch: %s\n" + tool_name Version.version Version.buildnr Version.tag Version.branch + else + Printf.sprintf "The CompCert %s,\nversion %s\n" tool_name Version.version + let print_version_file_and_exit tool_name file = let oc = open_out_bin file in - output_string oc (version_string tool_name); + output_string oc (version_file_string tool_name); close_out_noerr oc; exit 0 @@ -87,6 +93,7 @@ let general_help = -v Print external commands before invoking them -timings Show the time spent in various compiler passes -version Print the version string and exit + -version-file <file> Print version inforation to <file> and exit -target <value> Generate code for the given target -conf <file> Read configuration from file @<file> Read command line options from <file> |