Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
0053526e
Commit
0053526e
authored
Jul 16, 2016
by
Andrey Mokhov
Committed by
GitHub
Jul 16, 2016
Browse files
Minor revision
[skip ci]
parent
59b07fdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/user-settings.md
View file @
0053526e
...
...
@@ -17,7 +17,8 @@ buildRootPath = "_build"
## Build flavour
Build _flavour_ is a collection of build settings that fully define a GHC build:
Build _flavour_ is a collection of build settings that fully define a GHC build
(see
`src/Flavour.hs`
):
```
haskell
data
Flavour
=
Flavour
{
name
::
String
-- ^ Flavour name, to set from command line.
...
...
@@ -37,21 +38,22 @@ a few others), which can be activated from the command line, e.g. `--flavour=qui
Users can define new build flavours by adding them to
`userFlavours`
list:
```
haskell
userFlavour
::
Flavour
userFlavour
=
defaultFlavour
{
name
=
"user"
,
...
}
-- mofidy the default flavour
userFlavour
=
defaultFlavour
{
name
=
"user"
,
...
}
-- mofidy the default
build
flavour
userFlavours
::
[
Flavour
]
userFlavours
=
[
userFlavour
]
```
Now
`--flavour=user`
will run Hadrian with
`userFlavour`
settings. Note:
`defaultFlavour`
is defined in module
`Settings.Default`
, which must be
imported as
`import {-# SOURCE #-} Settings.Default`
to handle cyclic
module dependencies. In the following sections we look at specific fields of
the
`Flavour`
record in more detail.
Now
`--flavour=user`
will run Hadrian with
`userFlavour`
settings. In the
following sections we look at specific fields of the
`Flavour`
record in
more detail. Note:
`defaultFlavour`
, as well as its individual fields such
as
`defaultArgs`
,
`defaultPackages`
, etc. that we use below, are defined in module
`Settings.Default`
. Import it as
`import {-# SOURCE #-} Settings.Default`
to handle cyclic module dependencies.
## Command line arguments
One of the key features of Hadrian is that users can modify any build command
by
changing
`userArgs`
.
The build system will detect the change and will rerun all
One of the key features of Hadrian is that users can
easily
modify any build command
.
The build system will detect the change and will rerun all
affected build rules during the next build, without requiring a full rebuild.
For example, here is how to pass an extra argument
`-O0`
to all invocations of
...
...
@@ -106,7 +108,7 @@ userKnownPackages = [userPackage]
userPackage
::
Package
userPackage
=
library
"user-package"
```
Note, y
ou will also need to add
`userPackage`
to a specific build stage by modifying
Y
ou will also need to add
`userPackage`
to a specific build stage by modifying
`userPackages`
as otherwise it will not be built.
You can choose which integer library to use when builing GHC by setting
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment