diff --git a/doc/build_command.md b/doc/build_command.md index 8e5e80ed93..1539599aa8 100644 --- a/doc/build_command.md +++ b/doc/build_command.md @@ -168,7 +168,11 @@ part of Stack's [user's guide](GUIDE.md#the-stack-build-command) for information about how these dependencies get specified. In addition to specifying targets, you can also control what gets built, or -retained, with the following flags: +retained, with the flags and options listed below. You can also affect what gets +built by specifying Cabal (the library) options for the configure step +of the Cabal build process (for further information, see the documentation for +the [configure-options](yaml_configuration.md#configure-options) configuration +option). ### `--bench` flag diff --git a/doc/yaml_configuration.md b/doc/yaml_configuration.md index 221df28b6d..c0f65571b4 100644 --- a/doc/yaml_configuration.md +++ b/doc/yaml_configuration.md @@ -830,10 +830,19 @@ configure-options: - /some/path $locals: - --happy-option=--ghc + $targets: + # Only works on platforms where GHC supports linking against shared Haskell + # libraries: + - --enable-executable-dynamic my-package: - --another-flag ~~~ +On platforms where GHC supports linking against shared Haskell libraries (that +currently excludes Windows), Cabal's `--enable-executable-dynamic` flag (which +implies `--enable-shared`, unless `--disable-shared` is specified) links +dependent Haskell libraries into executables dynamically. + ### connection-count Default: `8`