Skip to content

Commit

Permalink
[dune subst] Interpret common command line flags.
Browse files Browse the repository at this point in the history
In particular I wanted this as to have `dune subst` interpret
`--debug-backtraces` in the context of ocaml#3219

Signed-off-by: Emilio Jesus Gallego Arias <[email protected]>
  • Loading branch information
ejgallego committed Oct 20, 2020
1 parent 0850bb9 commit b701cea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Unreleased
on UNIX-like systems as a unrelated `gmake` binary might exist on Windows.
(#3853, @kit-ty-kate)

- `dune subst` now accepts common command-line arguments such as
`--debug-backtraces` (#3878, @ejgallego)

2.7.1 (2/09/2020)
-----------------

Expand Down
12 changes: 4 additions & 8 deletions bin/subst.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ let man =
let info = Term.info "subst" ~doc ~man

let term =
let+ () = Common.build_info in
let config : Config.t =
{ Config.default with display = Quiet; concurrency = Fixed 1 }
in
Path.set_root (Path.External.cwd ());
Path.Build.set_build_dir (Path.Build.Kind.of_string Common.default_build_dir);
Config.init config;
Log.init_disabled ();
let+ () = Common.build_info
and+ common = Common.term in
Common.set_common common ~targets:[];
let config = Common.config common in
Dune_engine.Scheduler.go ~config Watermarks.subst

let command = (term, info)

0 comments on commit b701cea

Please sign in to comment.