summaryrefslogtreecommitdiff
path: root/hadrian/hadrian.cabal
blob: b220f2746264b1cca40941e084fc5d806d7f9d38 (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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
cabal-version:       1.18
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
extra-doc-files:     README.md

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.

-- See also #21913
flag selftest
     manual:             True
     default:            True
     description:        Enables the hadrian selftest rules which require
                         QuickCheck. Disabling it thus saves on a few dependencies
                         which can be problematic when bootstrapping.

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.Builder.Git
                       , 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.CabalReinstall
                       , 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.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.Ar
                       , Settings.Builders.Ld
                       , Settings.Builders.Make
                       , Settings.Builders.MergeObjects
                       , Settings.Builders.RunTest
                       , Settings.Builders.Win32Tarballs
                       , 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.Flavours.Release
                       , 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.9
                       , 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
                       , time
                       , mtl                  >= 2.2     && < 2.4
                       , parsec               >= 3.1     && < 3.2
                       , shake                >= 0.18.3  && < 0.20
                       , transformers         >= 0.4     && < 0.7
                       , unordered-containers >= 0.2.1   && < 0.3
                       , text                 >= 1.2     && < 3
    ghc-options:       -Wall
                       -Wincomplete-record-updates
                       -Wredundant-constraints
                       -fno-warn-name-shadowing
                       -rtsopts
                       -fno-ignore-asserts

    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

    if flag(selftest)
      other-modules:   Rules.Selftest
      cpp-options:     -DHADRIAN_ENABLE_SELFTEST
      build-depends:   QuickCheck           >= 2.6     && < 2.15