Add -null option to linters

Since the omp driver doesn't support this option yet, we must add it
conditionally. This is a temporary workaround.
This commit is contained in:
Rudi Grinberg 2018-01-10 02:13:34 +08:00
parent 1fc0ef0ab1
commit ca1c8dd897
1 changed files with 6 additions and 0 deletions

View File

@ -925,6 +925,12 @@ module PP = struct
; Ml_kind.ppx_driver_flag kind
; Dep src_path
] in
let args =
(* This hack is needed until -null is standard:
https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues/35 *)
match Option.map ~f:Pp.to_string (List.last pps) with
| Some "ppx_driver.runner" -> args @ [A "-null"]
| Some _ | None -> args in
let digest_path =
Alias.add_stamp_dep (aliases sctx) alias
~data:(