From c25f5feafb8ca086ebe77b29da99ee5519270a03 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 12 Jan 2021 04:27:25 -0800 Subject: [PATCH] [sledge] Compile debug mode with optimization enabled Summary: The ~20% hit in compilation time is dominated by the time saved running the tests. This also makes the memory allocation numbers more robust to inconsequential changes. Note that `make check` is still fast. Note that normally dune passes `-g` to ocamlopt itself, but not if the build profile includes an `ocamlopt_flags` entry. So add it explicitly to ensure that compilation includes debug symbols. (Also remove `-error-style short` that was missed in 9c4f263.) Reviewed By: jvillard Differential Revision: D25756570 fbshipit-source-id: 94d18bac2 --- sledge/dune | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sledge/dune b/sledge/dune index 5dcd7472d..26dce5bbc 100644 --- a/sledge/dune +++ b/sledge/dune @@ -7,20 +7,21 @@ (debug (flags (-w +a-4-9-18-30-40-42-44-48@50-66 -strict-formats -strict-sequence - -short-paths -bin-annot -keep-locs -keep-docs -opaque)) + -short-paths -bin-annot -keep-locs -keep-docs -g)) + (ocamlopt_flags (-O3)) (env-vars (PPX_TRACE_ENABLED 1)) (inline_tests enabled)) (trace (flags - (-w -a -error-style short -noassert -unboxed-types)) + (-w -a -noassert -unboxed-types -g)) (ocamlopt_flags (-O3)) (env-vars (PPX_TRACE_ENABLED 1)) (inline_tests disabled)) (_ ; release, dev, default,... (flags - (-w -a -error-style short -noassert -unboxed-types)) + (-w -a -noassert -unboxed-types)) (ocamlopt_flags (-O3)) (env-vars (PPX_TRACE_ENABLED 0))