aboutsummaryrefslogtreecommitdiff
path: root/pandoc.cabal
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2021-03-01 19:29:41 -0800
committerJohn MacFarlane <[email protected]>2021-03-01 19:29:41 -0800
commitf6edde944e73ada7eb4965bd2ece381f3e2a47bc (patch)
treec82c99fe374892df1326b9c1b0a52f357731a908 /pandoc.cabal
parent26c496d93647dd589af6c07c2273801ff7b49950 (diff)
Add lowmem flag.lowmem
This disables optimizations in select modules that cause problems compiling in lower memory environments. (LaTeX reader, LaTeX and Markdown writers) Performance is 10x slower for reading LaTeX, 20% slower for writing Markdown and LaTeX.
Diffstat (limited to 'pandoc.cabal')
-rw-r--r--pandoc.cabal8
1 files changed, 8 insertions, 0 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index ad325ee24..b588c5714 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -392,6 +392,12 @@ flag embed_data_files
Description: Embed data files in binary for relocatable executable.
Default: False
+flag lowmem
+ Description: Disable optimization on three modules that need a lot
+ of memory to compile. Set this flag if your pandoc
+ build is failing due to out of memory errors.
+ Default: False
+
flag trypandoc
Description: Build trypandoc cgi executable.
Default: False
@@ -505,6 +511,8 @@ library
if flag(embed_data_files)
cpp-options: -DEMBED_DATA_FILES
other-modules: Text.Pandoc.Data
+ if flag(lowmem)
+ cpp-options: -DLOWMEM
hs-source-dirs: src
exposed-modules: Text.Pandoc,