1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Factor out common executable flags

This commit is contained in:
Patrick Thomson 2019-02-19 14:31:16 -05:00
parent 50b55b084f
commit 1d600e199c

View File

@ -60,6 +60,9 @@ common dependencies
, proto3-suite , proto3-suite
, proto3-wire , proto3-wire
common executable-flags
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m"
library library
import: haskell, dependencies import: haskell, dependencies
hs-source-dirs: src hs-source-dirs: src
@ -319,20 +322,18 @@ library
ghc-prof-options: -fprof-auto ghc-prof-options: -fprof-auto
executable semantic executable semantic
import: haskell, dependencies import: haskell, dependencies, executable-flags
hs-source-dirs: app hs-source-dirs: app
main-is: Main.hs main-is: Main.hs
if flag(release) if flag(release)
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m" -static -j -O1 -DCOMPUTE_GIT_SHA ghc-options: -O1 -DCOMPUTE_GIT_SHA
else else
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m" -j -O0 -dynamic ghc-options: -O0 -dynamic
cc-options: -DU_STATIC_IMPLEMENTATION=1
cpp-options: -DU_STATIC_IMPLEMENTATION=1
build-depends: base build-depends: base
, semantic , semantic
test-suite test test-suite test
import: haskell, dependencies import: haskell, dependencies, executable-flags
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
hs-source-dirs: test hs-source-dirs: test
main-is: Spec.hs main-is: Spec.hs
@ -379,30 +380,26 @@ test-suite test
, hspec-expectations-pretty-diff , hspec-expectations-pretty-diff
, HUnit , HUnit
, leancheck , leancheck
ghc-options: -O0
if flag(release) if flag(release)
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0 ghc-options: -dynamic
else
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0 -dynamic
test-suite parse-examples test-suite parse-examples
import: haskell, dependencies import: haskell, dependencies
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
hs-source-dirs: test hs-source-dirs: test
main-is: Examples.hs main-is: Examples.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j
build-depends: semantic build-depends: semantic
, hspec >= 2.4.1 , hspec >= 2.4.1
, hspec-core , hspec-core
, hspec-expectations-pretty-diff , hspec-expectations-pretty-diff
benchmark evaluation benchmark evaluation
import: haskell import: haskell, executable-flags
hs-source-dirs: bench/evaluation hs-source-dirs: bench/evaluation
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
main-is: Main.hs main-is: Main.hs
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m -T" -static -j -O1 ghc-options: -static -O1
cc-options: -DU_STATIC_IMPLEMENTATION=1
cpp-options: -DU_STATIC_IMPLEMENTATION=1
build-depends: base build-depends: base
, criterion , criterion
, semantic , semantic