From 26c496d93647dd589af6c07c2273801ff7b49950 Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Mon, 1 Mar 2021 10:06:10 -0800 Subject: [PATCH] Use -split-sections in creating release binary. This is supposed to reduce executable size. --- .circleci/config.yml | 4 ++-- .github/workflows/release-candidate.yml | 2 +- linux/make_artifacts.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f569da65..1c8d9cb4a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,10 +20,10 @@ jobs: command: stack --no-terminal setup - run: name: Run tests - command: stack --no-terminal test + command: stack --no-terminal test --ghc-options=-split-sections - run: name: Install executable - command: stack --no-terminal install + command: stack --no-terminal install --ghc-options=-split-sections - run: name: Create artifacts command: | diff --git a/.github/workflows/release-candidate.yml b/.github/workflows/release-candidate.yml index 85ae96860..4afc7df08 100644 --- a/.github/workflows/release-candidate.yml +++ b/.github/workflows/release-candidate.yml @@ -31,7 +31,7 @@ jobs: versions: - osarch: "windows-x86_64" arch: "x64" - stack_opts: "-j1" + stack_opts: "-j1 --ghc-options=-split-sections" steps: - uses: actions/checkout@v1 diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index 34c0bd082..f0ff00f1a 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -16,7 +16,7 @@ ghc --version cabal v2-update cabal v2-clean -cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-optc-Os -optl=-pthread' pandoc +cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-split-sections -optc-Os -optl=-pthread' pandoc cabal v2-build cabal v2-test -j1 for f in $(find dist-newstyle -name 'pandoc' -type f -perm /400); do cp $f /artifacts/; done