aboutsummaryrefslogtreecommitdiff
path: root/kernel/nativelibrary.ml
diff options
context:
space:
mode:
authorcoqbot-app[bot]2021-02-25 16:46:41 +0000
committerGitHub2021-02-25 16:46:41 +0000
commit24e94b3dac66510e6d57b9f55f9a4e3e84fd6e54 (patch)
tree5befd0a43d5973f3c0707c65a90265121db8047c /kernel/nativelibrary.ml
parent6ef58b0e9348d49ccf456d9fd475368c3dc1aafa (diff)
parent0772562f1ef66ee69677456963187d6ff736b0bf (diff)
Merge PR #13202: Infrastructure for fine-grained debug flags
Reviewed-by: gares Ack-by: herbelin Ack-by: Zimmi48 Ack-by: jfehrle Ack-by: SkySkimmer Ack-by: ejgallego
Diffstat (limited to 'kernel/nativelibrary.ml')
-rw-r--r--kernel/nativelibrary.ml18
1 files changed, 9 insertions, 9 deletions
diff --git a/kernel/nativelibrary.ml b/kernel/nativelibrary.ml
index c95880dc36..2e27fe071e 100644
--- a/kernel/nativelibrary.ml
+++ b/kernel/nativelibrary.ml
@@ -28,35 +28,35 @@ and translate_field prefix mp env acc (l,x) =
match x with
| SFBconst cb ->
let con = Constant.make2 mp l in
- (if !Flags.debug then
+ (debug_native_compiler (fun () ->
let msg = Printf.sprintf "Compiling constant %s..." (Constant.to_string con) in
- Feedback.msg_debug (Pp.str msg));
+ Pp.str msg));
compile_constant_field env prefix con acc cb
| SFBmind mb ->
- (if !Flags.debug then
+ (debug_native_compiler (fun () ->
let id = mb.mind_packets.(0).mind_typename in
let msg = Printf.sprintf "Compiling inductive %s..." (Id.to_string id) in
- Feedback.msg_debug (Pp.str msg));
+ Pp.str msg));
compile_mind_field mp l acc mb
| SFBmodule md ->
let mp = md.mod_mp in
- (if !Flags.debug then
+ (debug_native_compiler (fun () ->
let msg =
Printf.sprintf "Compiling module %s..." (ModPath.to_string mp)
in
- Feedback.msg_debug (Pp.str msg));
+ Pp.str msg));
translate_mod prefix mp env md.mod_type acc
| SFBmodtype mdtyp ->
let mp = mdtyp.mod_mp in
- (if !Flags.debug then
+ (debug_native_compiler (fun () ->
let msg =
Printf.sprintf "Compiling module type %s..." (ModPath.to_string mp)
in
- Feedback.msg_debug (Pp.str msg));
+ Pp.str msg));
translate_mod prefix mp env mdtyp.mod_type acc
let dump_library mp dp env mod_expr =
- if !Flags.debug then Feedback.msg_debug (Pp.str "Compiling library...");
+ debug_native_compiler (fun () -> Pp.str "Compiling library...");
match mod_expr with
| NoFunctor struc ->
let env = add_structure mp struc empty_delta_resolver env in