Skip to content

Commit b2f77eb

Browse files
committed
Merge branch 'stable' into rc/v2.15
2 parents 1c883ca + aa87914 commit b2f77eb

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

doc/build_command.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,15 +492,19 @@ The effect of `--fast` can be overriden with Stack's
492492

493493
### `--ghc-options` option
494494

495+
Augment and, if applicable, override any GHC command line options specified in
496+
Cabal files (including those created from `package.yaml` files) or in Stack's
497+
YAML configuration files.
498+
495499
`stack build --ghc-options <ghc_options>` passes the specified command line
496500
options to GHC, depending on Stack's
497501
[`apply-ghc-options`](yaml_configuration.md#apply-ghc-options) YAML
498502
configuration option. This option can be specified multiple times.
499503

500-
GHC's command line options are evaluated from left to right. Later options can
501-
override the effect of earlier ones. Stack applies the options specified at the
502-
command line last. Any existing GHC command line options of a package are
503-
applied after those specified at the command line.
504+
GHC's command line options are _order-dependent_ and evaluated from left to
505+
right. Later options can override the effect of earlier ones. Any GHC command
506+
line options for a package specified at Stack's command line are applied after
507+
those specified in Stack's YAML configuration files.
504508

505509
### `--[no-]library-profiling` flag
506510

doc/yaml_configuration.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,10 @@ arguments include `standard`, `gmp4`, `nopie`, `tinfo6`, `tinfo6-libc6-pre232`,
10321032
Default: `{}`
10331033

10341034
Related command line (takes precedence):
1035-
[`stack build --ghc-options`](build_command.md#ghc-options-option) option
1035+
[`stack build --ghc-options`](build_command.md#-ghc-options-option) option
1036+
1037+
Augment and, if applicable, override any GHC command line options specified in
1038+
Cabal files (including those created from `package.yaml` files).
10361039

10371040
`ghc-options` can specify GHC command line options for a named package, all
10381041
local packages that are targets (using the `$targets` key), all local packages
@@ -1048,10 +1051,11 @@ ghc-options:
10481051
~~~
10491052

10501053
GHC's command line options are _order-dependent_ and evaluated from left to
1051-
right. Later options can override earlier options. Stack applies options (as
1052-
applicable) in the order of `$everything`, `$locals`, `$targets`, and then those
1053-
for the named package. Any existing GHC command line options of a package are
1054-
applied after those specified in Stack's YAML configuration.
1054+
right. Later options can override the effect of earlier ones. Stack applies
1055+
options (as applicable) in the order of `$everything`, `$locals`, `$targets`,
1056+
and then those for the named package. Any GHC command line options for a package
1057+
specified at Stack's command line are applied after those specified in Stack's
1058+
YAML configuration files.
10551059

10561060
Since Stack 1.6.1, setting a GHC options for a specific package will
10571061
automatically promote it to a local package (much like setting a custom package

0 commit comments

Comments
 (0)