summaryrefslogtreecommitdiff
path: root/hadrian/hadrian.cabal
blob: 173fc84459a6ee2482df3e348181f016edacca69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name:                hadrian
version:             0.1.0.0
synopsis:            GHC build system
license:             BSD3
license-file:        LICENSE
author:              Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
maintainer:          Andrey Mokhov <andrey.mokhov@gmail.com>, github: @snowleopard
copyright:           Andrey Mokhov 2014-2017
category:            Development
build-type:          Simple
cabal-version:       >=1.10

source-repository head
    type:     git
    location: https://gitlab.haskell.org/ghc/ghc

-- To accommodate #16873
flag threaded
    manual:              True
    default:             True
    description:         Build with the threaded runtime for improved
                         performance. Users with bootstrap compilers
                         which don't support the threaded runtime should
                         disable this flag.

executable hadrian
    main-is:             Main.hs
    hs-source-dirs:      .
                       , src
    other-modules:       Base
                       , Builder
                       , CommandLine
                       , Context
                       , Context.Path
                       , Context.Type
                       , Environment
                       , Expression
                       , Expression.Type
                       , Flavour
                       , Flavour.Type
                       , Hadrian.Builder
                       , Hadrian.Builder.Ar
                       , Hadrian.Builder.Sphinx
                       , Hadrian.Builder.Tar
                       , Hadrian.BuildPath
                       , Hadrian.Expression
                       , Hadrian.Haskell.Cabal
                       , Hadrian.Haskell.Cabal.Type
                       , Hadrian.Haskell.Cabal.Parse
                       , Hadrian.Oracles.ArgsHash
                       , Hadrian.Oracles.Cabal
                       , Hadrian.Oracles.Cabal.Rules
                       , Hadrian.Oracles.Cabal.Type
                       , Hadrian.Oracles.DirectoryContents
                       , Hadrian.Oracles.Path
                       , Hadrian.Oracles.TextFile
                       , Hadrian.Package
                       , Hadrian.Target
                       , Hadrian.Utilities
                       , Oracles.Flag
                       , Oracles.Flavour
                       , Oracles.Setting
                       , Oracles.ModuleFiles
                       , Oracles.TestSettings
                       , Packages
                       , Rules
                       , Rules.BinaryDist
                       , Rules.Clean
                       , Rules.Compile
                       , Rules.Dependencies
                       , Rules.Docspec
                       , Rules.Documentation
                       , Rules.Generate
                       , Rules.Gmp
                       , Rules.Libffi
                       , Rules.Library
                       , Rules.Lint
                       , Rules.Nofib
                       , Rules.Program
                       , Rules.Register
                       , Rules.Rts
                       , Rules.Selftest
                       , Rules.SimpleTargets
                       , Rules.SourceDist
                       , Rules.Test
                       , Rules.ToolArgs
                       , Settings
                       , Settings.Builders.Alex
                       , Settings.Builders.Cabal
                       , Settings.Builders.Common
                       , Settings.Builders.Cc
                       , Settings.Builders.Configure
                       , Settings.Builders.DeriveConstants
                       , Settings.Builders.GenPrimopCode
                       , Settings.Builders.Ghc
                       , Settings.Builders.GhcPkg
                       , Settings.Builders.Haddock
                       , Settings.Builders.Happy
                       , Settings.Builders.Hsc2Hs
                       , Settings.Builders.HsCpp
                       , Settings.Builders.Ld
                       , Settings.Builders.Make
                       , Settings.Builders.MergeObjects
                       , Settings.Builders.RunTest
                       , Settings.Builders.Xelatex
                       , Settings.Default
                       , Settings.Flavours.Benchmark
                       , Settings.Flavours.Development
                       , Settings.Flavours.GhcInGhci
                       , Settings.Flavours.Performance
                       , Settings.Flavours.Quick
                       , Settings.Flavours.QuickCross
                       , Settings.Flavours.Quickest
                       , Settings.Flavours.Validate
                       , Settings.Packages
                       , Settings.Parser
                       , Settings.Program
                       , Settings.Warnings
                       , Stage
                       , Target
                       , UserSettings
                       , Utilities
                       , Way
                       , Way.Type
    default-language:    Haskell2010
    default-extensions:  DeriveFunctor
                       , DeriveGeneric
                       , FlexibleInstances
                       , GeneralizedNewtypeDeriving
                       , LambdaCase
                       , RecordWildCards
                       , ScopedTypeVariables
                       , TupleSections
                       , BangPatterns
    other-extensions:    MultiParamTypeClasses
                       , TypeFamilies
    build-depends:       Cabal                >= 3.2     && < 3.5
                       , QuickCheck           >= 2.6     && < 2.15
                       , base                 >= 4.8     && < 5
                       , bytestring           >= 0.10    && < 0.12
                       , containers           >= 0.5     && < 0.7
                       , directory            >= 1.3.1.0 && < 1.4
                       , extra                >= 1.4.7
                       , filepath
                       , mtl                  == 2.2.*
                       , parsec               >= 3.1     && < 3.2
                       , shake                >= 0.18.3  && < 0.20
                       , transformers         >= 0.4     && < 0.6
                       , unordered-containers >= 0.2.1   && < 0.3
    ghc-options:       -Wall
                       -Wincomplete-record-updates
                       -Wredundant-constraints
                       -fno-warn-name-shadowing
                       -rtsopts

    if flag(threaded)
      ghc-options:
                       -- * -I0: Disable idle GC to avoid redundant GCs while
                       --        waiting for external processes
                       -- * -qg: Don't use parallel GC as the synchronization
                       --        time tends to eat any benefit.
                       "-with-rtsopts=-I0 -qg"
                       -threaded