From e6c16821a7b5915662b271dd81e3a1fc57c32fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Choutri?= Date: Tue, 26 Mar 2024 11:38:08 +0100 Subject: [PATCH] [NO-ISSUE] Put the release compilation options in their own file --- .gitignore | 1 + Makefile | 8 ++++++-- cabal.project.release | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 cabal.project.release diff --git a/.gitignore b/.gitignore index 2e2d0d86..8ccf7043 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ design/node_modules *.dump-timings _build/cabal-store storage/ +cabal.project.release.freeze diff --git a/Makefile b/Makefile index 99b6dc14..44edacfc 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,12 @@ init: ## Set up git hooks properly - needs calling once when cloning the repo start: ## Start flora-server @cabal run exe:flora-server -build: soufflé ## Build the backend - @cabal build -j -O1 +build: soufflé ## Build the server + @cabal build -O1 + +build-release: soufflé ## Build the server for production + @cabal freeze --project-file cabal.project.release + @cabal build --project-file cabal.project.release clean: ## Remove the cabal build artifacts @rm cbits/*.cpp diff --git a/cabal.project.release b/cabal.project.release new file mode 100644 index 00000000..264937c3 --- /dev/null +++ b/cabal.project.release @@ -0,0 +1,8 @@ +import: ./cabal.project + +tests: False +documentation: False +optimization: 2 + +package * + flags: +prod