Use -split-sections in creating release binary.
This is supposed to reduce executable size.
commit26c496d93647dd589af6c07c2273801ff7b49950
authorJohn MacFarlane <jgm@berkeley.edu>
dateMon 1 Mar 2021, 10:06 (6 years ago)
parent7f1b933
.circleci/config.yml+2−2
@@ -20,10 +20,10 @@ jobs:
2020 command: stack --no-terminal setup
2121 - run:
2222 name: Run tests
23− command: stack --no-terminal test
23+ command: stack --no-terminal test --ghc-options=-split-sections
2424 - run:
2525 name: Install executable
26− command: stack --no-terminal install
26+ command: stack --no-terminal install --ghc-options=-split-sections
2727 - run:
2828 name: Create artifacts
2929 command: |
.github/workflows/release-candidate.yml+1−1
@@ -31,7 +31,7 @@ jobs:
3131 versions:
3232 - osarch: "windows-x86_64"
3333 arch: "x64"
34− stack_opts: "-j1"
34+ stack_opts: "-j1 --ghc-options=-split-sections"
3535
3636 steps:
3737 - uses: actions/checkout@v1
linux/make_artifacts.sh+1−1
@@ -16,7 +16,7 @@ ghc --version
1616
1717cabal v2-update
1818cabal v2-clean
19−cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-optc-Os -optl=-pthread' pandoc
19+cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-split-sections -optc-Os -optl=-pthread' pandoc
2020cabal v2-build
2121cabal v2-test -j1
2222for f in $(find dist-newstyle -name 'pandoc' -type f -perm /400); do cp $f /artifacts/; done