These options are common to all commands.
--always-show-command-line
Always show the full command lines of programs executed by dune.
--auto-promote
Automatically promote files. This is similar to running dunepromote after the build.
--build-dir=FILE (absent DUNE_BUILD_DIR env)
Specified build directory. _build if unspecified
--cache=VAL (absent DUNE_CACHE env)
Enable or disable Dune cache (one of disabled, enabled-except-user-rules or enabled). Default is
`enabled-except-user-rules'.
--cache-check-probability=VAL (absent DUNE_CACHE_CHECK_PROBABILITY env)
Check build reproducibility by re-executing randomly chosen rules and comparing their results with
those stored in Dune cache. Note: by increasing the probability of such checks you slow down the
build. The default probability is zero, i.e. no rules are checked.
--cache-storage-mode=VAL (absent DUNE_CACHE_STORAGE_MODE env)
Dune cache storage mode (one of auto, hardlink or copy). Default is `hardlink'.
--config-file=FILE
Load this configuration file instead of the default one.
--debug-artifact-substitution
Print debugging info about artifact substitution
--debug-backtraces
Always print exception backtraces.
--debug-cache=VAL
Show debug messages on cache misses for the given cache layers. Value is a comma-separated list of
cache layer names. All available cache layers: shared,workspace-local,fs.
--debug-dependency-path
In case of error, print the dependency path from the targets on the command line to the rule that
failed.
--debug-digests
Explain why Dune decides to re-digest some files
--debug-load-dir
Print debugging info about directory loading
--debug-package-logs (absent DUNE_DEBUG_PACKAGE_LOGS env)
Always print the standard logs when building packages
--default-target=TARGET (absent=@@default)
Set the default target that is used when none is specified to dunebuild.
--diff-command=VAL (absent DUNE_DIFF_COMMAND env)
Shell command to use to diff files. Use - to disable printing the diff.
--disable-promotion (absent DUNE_DISABLE_PROMOTION env)
Disable all promotion rules
--display=MODE
Control the display mode of Dune. See dune-config(5) for more details. Valid values for this option
are progress, verbose, short, quiet or tui.
--dump-gc-stats=FILE
Dump the garbage collector stats to a file after the build is complete.
--dump-memo-graph=FILE
Dump the dependency graph to a file after the build is complete.
--dump-memo-graph-format=FORMAT (absent=gexf)
Set the file format used by --dump-memo-graph--dump-memo-graph-with-timing
Re-run each cached node in the Memo graph after building and include the run duration in the output
of --dump-memo-graph. Since all nodes contain a cached value, each measurement will only account for
a single node.
--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto,
the format is pager or plain whenever the TERM env var is dumb or undefined.
--ignore-lock-dir
Ignore dune.lock/ directory.
--ignore-promoted-rules
Ignore rules with (mode promote), except ones with (only ...). The variable
%{ignoring_promoted_rules} in dune files reflects whether this option was passed or not.
--instrument-with=BACKENDS (absent DUNE_INSTRUMENT_WITH env)
Enable instrumentation by BACKENDS. BACKENDS is a comma-separated list of library names, each one of
which must declare an instrumentation backend.
-jJOBS
Run no more than JOBS commands simultaneously.
--no-buffer
Do not buffer the output of commands executed by dune. By default dune buffers the output of
subcommands, in order to prevent interleaving when multiple commands are executed in parallel.
However, this can be an issue when debugging long running tests. With --no-buffer, commands have
direct access to the terminal. Note that as a result their output won't be captured in the log file.
You should use this option in conjunction with -j1, to avoid interleaving. Additionally you should
use --verbose as well, to make sure that commands are printed before they are being executed.
--no-config
Do not load the configuration file
--no-print-directory
Suppress "Entering directory" messages.
--only-packages=PACKAGES
Ignore stanzas referring to a package that is not in PACKAGES. PACKAGES is a comma-separated list of
package names. Note that this has the same effect as deleting the relevant stanzas from dune files.
It is mostly meant for releases. During development, it is likely that what you want instead is to
build a particular <package>.install target.
-pPACKAGES, --for-release-of-packages=PACKAGES (required)
Shorthand for --release--only-packagesPACKAGE. You must use this option in your <package>.opam
files, in order to build only what's necessary when your project contains multiple packages as well
as getting reproducible builds.
--print-metrics
Print out various performance metrics after every build.
--profile=VAL (absent DUNE_PROFILE env)
Select the build profile, for instance dev or release. The default is dev.
--promote-install-files[=VAL] (default=true)
Promote any generated <package>.install files to the source tree.
--release
Put dune into a reproducible release mode. Shorthand for --root.--ignore-promoted-rules--no-config--profilerelease--always-show-command-line--promote-install-files--require-dune-project-file--ignore-lock-dir--default-target@install. You should use this option for release builds. For
instance, you must use this option in your <package>.opam files. Except if you already use -p, as -p
implies this option.
--require-dune-project-file[=VAL] (default=true)
Fail if a dune-project file is missing.
--root=DIR
Use this directory as workspace root instead of guessing it. Note that this option doesn't change the
interpretation of targets given on the command line. It is only intended for scripts.
--store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
Store original source location in dune-package metadata.
--terminal-persistence=MODE
Change how the log of build results are displayed to the console between rebuilds while in --watch
mode. Supported modes: preserve, clear-on-rebuild, clear-on-rebuild-and-flush-history.
--trace-extended
Output extended trace data (requires trace-file).
--trace-file=FILE
Output trace data in catapult format (compatible with chrome://tracing).
--verbose
Same as --displayverbose--version
Show version information.
--watch-exclusions=REGEX
Adds a POSIX regular expression that will exclude matching directories from `dunebuild--watch`. The
option --watch-exclusions can be repeated to add multiple exclusions. Semicolons can be also used as
a separator. If no exclusions are provided, then a standard set of exclusions is used; however, if
oneormore--watch-exclusions are used, none of the standard exclusions are used. The standard
exclusions are: ^_opam /_opam ^_esy /_esy ^\.#.* /\.#.* ~$ ^#[^#]*#$ /#[^#]*#$ ^4913$ /4913$ /.git
/.hg :/windows
--workspace=FILE (absent DUNE_WORKSPACE env)
Use this specific workspace file instead of looking it up.
-xVAL
Cross-compile using this toolchain.