aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Commandline.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2017-06-26 17:18:50 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2017-06-26 17:18:50 +0200
commit1530f96aa259f346f235de713ab53b682b6d82f6 (patch)
treed5377537033e473813033e20e86bfefa11ebb8e8 /driver/Commandline.ml
parent66ba0d63b25bab2a682c92c5a277c190b6c4c847 (diff)
downloadcompcert-1530f96aa259f346f235de713ab53b682b6d82f6.tar.gz
compcert-1530f96aa259f346f235de713ab53b682b6d82f6.zip
Added a little bit more compilation info to sdump.
The additional compilation information contains the file, command line (after @-file expansion) and the current working directory. Bug 21690
Diffstat (limited to 'driver/Commandline.ml')
-rw-r--r--driver/Commandline.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/Commandline.ml b/driver/Commandline.ml
index b544c37b..035c33e0 100644
--- a/driver/Commandline.ml
+++ b/driver/Commandline.ml
@@ -108,10 +108,12 @@ let parse_array spec argv first last =
end
in parse first
+let argv : string array ref = ref [||]
+
let parse_cmdline spec =
try
- let argv = expandargv Sys.argv in
- parse_array spec argv 1 (Array.length argv - 1)
+ argv := expandargv Sys.argv;
+ parse_array spec !argv 1 (Array.length !argv - 1)
with Responsefile.Error s ->
eprintf "%s" s;
exit 2