From 5ec43ca863c3ac8df8a9c42235cf33ac4d397496 Mon Sep 17 00:00:00 2001 From: Mike Pilgrem Date: Fri, 29 Mar 2024 18:16:20 +0000 Subject: [PATCH] Re #4983 Add online documentation of hidden options --- doc/build_command.md | 21 +++++++++++++++++++++ doc/config_command.md | 6 ++++++ doc/exec_command.md | 6 ++++++ doc/path_command.md | 6 ++++++ 4 files changed, 39 insertions(+) diff --git a/doc/build_command.md b/doc/build_command.md index 042afdff55..e100c458b8 100644 --- a/doc/build_command.md +++ b/doc/build_command.md @@ -581,6 +581,9 @@ 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 @@ -588,6 +591,9 @@ 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 @@ -636,6 +642,9 @@ 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 @@ -643,6 +652,9 @@ 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`. @@ -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 @@ -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 diff --git a/doc/config_command.md b/doc/config_command.md index b933e9c6f2..a5450c73c9 100644 --- a/doc/config_command.md +++ b/doc/config_command.md @@ -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 diff --git a/doc/exec_command.md b/doc/exec_command.md index 33ef16ab85..4a34a825cc 100644 --- a/doc/exec_command.md +++ b/doc/exec_command.md @@ -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). diff --git a/doc/path_command.md b/doc/path_command.md index 9f3528677d..f106189058 100644 --- a/doc/path_command.md +++ b/doc/path_command.md @@ -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).