Skip to content

Commit

Permalink
Force coloured output on non-MSVC
Browse files Browse the repository at this point in the history
Signed-off-by: Antonin Décimo <antonin@tarides.com>
  • Loading branch information
MisterDA committed Jan 6, 2021
1 parent 9cb9b44 commit 7aad7d5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dune_rules/super_context.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ let default_context_flags (ctx : Context.t) =
let cxx =
List.filter c ~f:(fun s -> not (String.is_prefix s ~prefix:"-std="))
in
let c, cxx =
if Lazy.force (Ansi_color.stderr_supports_color)
&& Ocaml_config.ccomp_type ctx.ocaml_config <> Msvc then
let colors = "-fdiagnostics-color=always" in
colors :: c, colors :: cxx
else
c, cxx
in
Foreign_language.Dict.make ~c ~cxx

module Env_tree : sig
Expand Down

0 comments on commit 7aad7d5

Please sign in to comment.