From b04aa8bb8eb2c7720d55e01453340b3380261c7a Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Thu, 21 Nov 2024 13:40:07 -0800 Subject: [PATCH] Add dumpcore flag --- unison-runtime/package.yaml | 6 +++++- unison-runtime/unison-runtime.cabal | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/unison-runtime/package.yaml b/unison-runtime/package.yaml index e9221c6d3e..850a83046c 100644 --- a/unison-runtime/package.yaml +++ b/unison-runtime/package.yaml @@ -11,13 +11,17 @@ flags: stackchecks: manual: true default: false + dumpcore: + manual: true + default: false when: - condition: flag(arraychecks) cpp-options: -DARRAY_CHECK - condition: flag(stackchecks) cpp-options: -DSTACK_CHECK - + - condition: flag(dumpcore) + ghc-options: -ddump-simpl -ddump-stg-final -ddump-to-file -dsuppress-coercions -dsuppress-idinfo -dsuppress-module-prefixes # -dsuppress-type-applications -dsuppress-type-signatures library: source-dirs: src diff --git a/unison-runtime/unison-runtime.cabal b/unison-runtime/unison-runtime.cabal index cc6e59bc6a..a23132a3f9 100644 --- a/unison-runtime/unison-runtime.cabal +++ b/unison-runtime/unison-runtime.cabal @@ -21,6 +21,10 @@ flag arraychecks manual: True default: False +flag dumpcore + manual: True + default: False + flag stackchecks manual: True default: False @@ -142,6 +146,8 @@ library cpp-options: -DARRAY_CHECK if flag(stackchecks) cpp-options: -DSTACK_CHECK + if flag(dumpcore) + ghc-options: -ddump-simpl -ddump-stg-final -ddump-to-file -dsuppress-coercions -dsuppress-idinfo -dsuppress-module-prefixes test-suite runtime-tests type: exitcode-stdio-1.0 @@ -221,3 +227,5 @@ test-suite runtime-tests cpp-options: -DARRAY_CHECK if flag(stackchecks) cpp-options: -DSTACK_CHECK + if flag(dumpcore) + ghc-options: -ddump-simpl -ddump-stg-final -ddump-to-file -dsuppress-coercions -dsuppress-idinfo -dsuppress-module-prefixes