Skip to content

Commit

Permalink
Re #4983 Add online documentation of hidden options
Browse files Browse the repository at this point in the history
  • Loading branch information
mpilgrem committed Mar 29, 2024
1 parent 31c0154 commit 5ec43ca
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
21 changes: 21 additions & 0 deletions doc/build_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,13 +581,19 @@ Default: Disabled
Set the flag to enable executable profiling for TARGETs and all its
dependencies.

The flag affects the location of the local project installation directory. See
the [`stack path --local-install-root`](path_command.md) command.

### `--[no-]executable-stripping` flag

Default: Enabled

Unset the flag to disable executable stripping for TARGETs and all its
dependencies.

The flag may affect the location of the local project installation directory.
See the [`stack path --local-install-root`](path_command.md) command.

### `--fast` flag

GHC has many flags that specify individual optimisations of the compiler. GHC
Expand Down Expand Up @@ -636,13 +642,19 @@ Default: Disabled

Set the flag to enable library profiling for TARGETs and all its dependencies.

The flag affects the location of the local project installation directory. See
the [`stack path --local-install-root`](path_command.md) command.

### `--[no-]library-stripping` flag

Default: Enabled

Unset the flag to disable library stripping for TARGETs and all its
dependencies.

The flag may affect the location of the local project installation directory.
See the [`stack path --local-install-root`](path_command.md) command.

### `--pedantic` flag

Pass the flag to build your project with the GHC options `-Wall` and `-Werror`.
Expand All @@ -654,6 +666,9 @@ Pass the flag to build your project with the GHC options `-Wall` and `-Werror`.
Pass the flag to enable profiling in libraries, executables, etc. for all
expressions, and generate a profiling report in tests or benchmarks.

The flag affects the location of the local project installation directory. See
the [`stack path --local-install-root`](path_command.md) command.

### `--[no-]split-objs` flag

:octicons-beaker-24: Experimental
Expand All @@ -677,11 +692,17 @@ executables, etc. for all expressions, producing larger executables but allowing
the use of standard debuggers/profiling tools/other utilities that use debugging
symbols.

The flag affects the location of the local project installation directory. See
the [`stack path --local-install-root`](path_command.md) command.

### `--trace` flag

Pass the flag to enable profiling in libraries, executables, etc. for all
expressions, and generate a backtrace on exception.

The flag affects the location of the local project installation directory. See
the [`stack path --local-install-root`](path_command.md) command.

## Flags affecting other tools' behaviour

### `--PROG-option` options
Expand Down
6 changes: 6 additions & 0 deletions doc/config_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ for a Stack environment. Flags modify the script that is output:
* `--[no-]keep-ghc-rts` (disabled by default) keep/discard any `GHCRTS`
environment variable

The command also accepts flags and options of the
[`stack build`](build_command.md#flags-affecting-ghcs-behaviour) command that
affect the location of the local project installation directory, such as
`--profile` and `--no-strip`. For further information, see the documentation of
the [project Stack work directory](stack_work.md#project-stack-work-directory).

## The `stack config set` commands

~~~text
Expand Down
6 changes: 6 additions & 0 deletions doc/exec_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ command line arguments. For example, to pass `'a single quoted string'`:

The content of single quotes is taken literally. Within single quotes, `''`
escapes a single quote.

The command also accepts flags and options of the
[`stack build`](build_command.md#flags-affecting-ghcs-behaviour) command that
affect the location of the local project installation directory, such as
`--profile` and `--no-strip`. For further information, see the documentation of
the [project Stack work directory](stack_work.md#project-stack-work-directory).
6 changes: 6 additions & 0 deletions doc/path_command.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,9 @@ Pass the following flags for information about specific files or locations:
|--snapshot-install-root|The root directory for snapshot installation. |
|--snapshot-pkg-db |The snapshot package database. |
|--stack-root |The Stack root. |

The command also accepts flags and options of the
[`stack build`](build_command.md#flags-affecting-ghcs-behaviour) command that
affect the location of the local project installation directory, such as
`--profile` and `--no-strip`. For further information, see the documentation of
the [project Stack work directory](stack_work.md#project-stack-work-directory).

0 comments on commit 5ec43ca

Please sign in to comment.