diff options
| author | Gaëtan Gilbert | 2018-09-28 15:36:14 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2018-09-28 15:36:14 +0200 |
| commit | d0122151acdbe15b88d144b730baf5b0febf3c70 (patch) | |
| tree | e1649d77813269a8f27ab25530718a994ce0b25c /tools | |
| parent | f070a1f6eb99de1461d5a846a4f9ed47dafa79c6 (diff) | |
| parent | 1a331405aa87c81eb51929557a7f3f10f8eabccf (diff) | |
Merge PR #8578: [dune] Allow to build CI after a Dune build.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/coqc.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/coqc.ml b/tools/coqc.ml index 90d8e67c1e..2cbf05bd8b 100644 --- a/tools/coqc.ml +++ b/tools/coqc.ml @@ -24,7 +24,7 @@ let environment = Unix.environment () -let binary = ref "coqtop" +let use_bytecode = ref false let image = ref "" let verbose = ref false @@ -69,8 +69,8 @@ let parse_args () = verbose := true ; parse (cfiles,args) rem | "-image" :: f :: rem -> image := f; parse (cfiles,args) rem | "-image" :: [] -> usage () - | "-byte" :: rem -> binary := "coqtop.byte"; parse (cfiles,args) rem - | "-opt" :: rem -> binary := "coqtop"; parse (cfiles,args) rem + | "-byte" :: rem -> use_bytecode := true; parse (cfiles,args) rem + | "-opt" :: rem -> use_bytecode := false; parse (cfiles,args) rem (* Informative options *) @@ -155,7 +155,7 @@ let main () = end; let coqtopname = if !image <> "" then !image - else Filename.concat Envars.coqbin (!binary ^ Coq_config.exec_extension) + else System.get_toplevel_path ~byte:!use_bytecode "coqtop" in (* List.iter (compile coqtopname args) cfiles*) Unix.handle_unix_error (compile coqtopname args) cfiles |
