aboutsummaryrefslogtreecommitdiffstats
path: root/driver/Configuration.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2019-05-06 17:07:24 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-05-10 14:30:37 +0200
commitb49feed2f88c0a6ae9cc2ca4b2982096f18a2112 (patch)
treea00311d29d497a43fbf410ad56073739808c1f6f /driver/Configuration.ml
parent47c86d46a329ee2c4c26a82b29edd40bb4b4c35c (diff)
downloadcompcert-kvx-b49feed2f88c0a6ae9cc2ca4b2982096f18a2112.tar.gz
compcert-kvx-b49feed2f88c0a6ae9cc2ca4b2982096f18a2112.zip
Expand the responsefiles earlier
* Move the expansion of response files to module Commandline, during the initialization of `Commandline.argv`. This way we're sure it's done exactly once. * Make `Commandline.argv` a `string array` instead of a `string array ref`. We no longer need to update it after initialization! * Improve reporting of errors during expansion of response files.
Diffstat (limited to 'driver/Configuration.ml')
-rw-r--r--driver/Configuration.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/Configuration.ml b/driver/Configuration.ml
index 972fd295..68531701 100644
--- a/driver/Configuration.ml
+++ b/driver/Configuration.ml
@@ -13,11 +13,11 @@
open Printf
let search_argv key =
- let len = Array.length Sys.argv in
+ let len = Array.length Commandline.argv in
let res: string option ref = ref None in
for i = 1 to len - 2 do
- if Sys.argv.(i) = key then
- res := Some Sys.argv.(i + 1);
+ if Commandline.argv.(i) = key then
+ res := Some Commandline.argv.(i + 1);
done;
!res