diff --git a/Makefile b/Makefile index a4a56d8d84..7924d2feb4 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,11 @@ build: $(all) # We bypass cabal, and only run the main ghc --make command for a # fast development built. Note: Does not rebuild C libraries. fast: dist/caballog - $$(grep 'ghc --make' dist/caballog | head -n 1 | sed 's/ -O / /') + $$(grep 'ghc --make' dist/caballog | head -n 1) ln -sf dist/build/git-annex/git-annex git-annex dist/caballog: - cabal configure -f-Production + cabal configure -f"-Production Fast" cabal build -v2 | tee $@ Build/SysConfig.hs: configure.hs Build/TestConfig.hs Build/Configure.hs diff --git a/git-annex.cabal b/git-annex.cabal index 7d370d34fc..0963731131 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -55,6 +55,9 @@ Flag DNS Flag Production Description: Enable production build (slower build; faster binary) +Flag Fast + Description: Faster build; slower binary + Flag Android Description: Building for Android Default: False @@ -81,6 +84,9 @@ Executable git-annex if flag(Production) GHC-Options: -O2 + if flag(Fast) + GHC-Options: -O0 + if flag(TestSuite) Build-Depends: testpack, HUnit CPP-Options: -DWITH_TESTSUITE