1
1
mirror of https://github.com/github/semantic.git synced 2024-11-24 17:04:47 +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-wire
common executable-flags
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m"
library
import: haskell, dependencies
hs-source-dirs: src
@ -319,20 +322,18 @@ library
ghc-prof-options: -fprof-auto
executable semantic
import: haskell, dependencies
import: haskell, dependencies, executable-flags
hs-source-dirs: app
main-is: Main.hs
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
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m" -j -O0 -dynamic
cc-options: -DU_STATIC_IMPLEMENTATION=1
cpp-options: -DU_STATIC_IMPLEMENTATION=1
ghc-options: -O0 -dynamic
build-depends: base
, semantic
test-suite test
import: haskell, dependencies
import: haskell, dependencies, executable-flags
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
@ -379,30 +380,26 @@ test-suite test
, hspec-expectations-pretty-diff
, HUnit
, leancheck
ghc-options: -O0
if flag(release)
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0
else
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j -O0 -dynamic
ghc-options: -dynamic
test-suite parse-examples
import: haskell, dependencies
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Examples.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N -j
build-depends: semantic
, hspec >= 2.4.1
, hspec-core
, hspec-expectations-pretty-diff
benchmark evaluation
import: haskell
import: haskell, executable-flags
hs-source-dirs: bench/evaluation
type: exitcode-stdio-1.0
main-is: Main.hs
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -A4m -n2m -T" -static -j -O1
cc-options: -DU_STATIC_IMPLEMENTATION=1
cpp-options: -DU_STATIC_IMPLEMENTATION=1
ghc-options: -static -O1
build-depends: base
, criterion
, semantic