diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2019-05-06 17:07:24 +0200 |
---|---|---|
committer | Xavier Leroy <xavierleroy@users.noreply.github.com> | 2019-05-10 14:30:37 +0200 |
commit | b49feed2f88c0a6ae9cc2ca4b2982096f18a2112 (patch) | |
tree | a00311d29d497a43fbf410ad56073739808c1f6f /backend/JsonAST.ml | |
parent | 47c86d46a329ee2c4c26a82b29edd40bb4b4c35c (diff) | |
download | compcert-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 'backend/JsonAST.ml')
-rw-r--r-- | backend/JsonAST.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/JsonAST.ml b/backend/JsonAST.ml index 3469bdc6..599c6ecb 100644 --- a/backend/JsonAST.ml +++ b/backend/JsonAST.ml @@ -129,9 +129,9 @@ let pp_ast pp pp_inst ast sourcename = let get_args () = let buf = Buffer.create 100 in Buffer.add_string buf Sys.executable_name; - for i = 1 to (Array.length !Commandline.argv - 1) do + for i = 1 to (Array.length Commandline.argv - 1) do Buffer.add_string buf " "; - Buffer.add_string buf (Responsefile.gnu_quote !Commandline.argv.(i)); + Buffer.add_string buf (Responsefile.gnu_quote Commandline.argv.(i)); done; Buffer.contents buf in let dump_compile_info pp () = |