From b49feed2f88c0a6ae9cc2ca4b2982096f18a2112 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 6 May 2019 17:07:24 +0200 Subject: 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. --- driver/Configuration.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'driver/Configuration.ml') 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 -- cgit