summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2024-09-18 18:05:30 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2024-10-01 16:33:24 +0300
commit9ce607665a2dfc2239198040494d646fa243747b (patch)
tree3985ce90956e3c153f10f7810e4728a460436ef6 /docs/markdown
parentd584c7debb128253c72df892595d9ffe79262f04 (diff)
downloadmeson-9ce607665a2dfc2239198040494d646fa243747b.tar.gz
Add a simple reproducibility test command.
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Commands.md28
-rw-r--r--docs/markdown/snippets/reprotester.md15
2 files changed, 43 insertions, 0 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md
index 542f1b269..8e34800a4 100644
--- a/docs/markdown/Commands.md
+++ b/docs/markdown/Commands.md
@@ -225,6 +225,34 @@ DESTDIR=/path/to/staging/area meson install -C builddir
Since *0.60.0* `DESTDIR` and `--destdir` can be a path relative to build
directory. An absolute path will be set into environment when executing scripts.
+### reprotest
+
+*(since 1.6.0)*
+
+{{ reprotest_usage.inc }}
+
+Simple reproducible build tester that compiles the project twice and
+checks whether the end results are identical.
+
+This command must be run in the source root of the project you want to
+test.
+
+{{ reprotest_arguments.inc }}
+
+#### Examples
+
+ meson reprotest
+
+Builds the current project with its default settings.
+
+ meson reprotest --intermediaries -- --buildtype=debugoptimized
+
+Builds the target and also checks that all intermediate files like
+object files are also identical. All command line arguments after the
+`--` are passed directly to the underlying `meson` invocation. Only
+use option arguments, i.e. those that start with a dash, Meson sets
+directory arguments automatically.
+
### rewrite
*(since 0.50.0)*
diff --git a/docs/markdown/snippets/reprotester.md b/docs/markdown/snippets/reprotester.md
new file mode 100644
index 000000000..dc86acdb9
--- /dev/null
+++ b/docs/markdown/snippets/reprotester.md
@@ -0,0 +1,15 @@
+## Simple tool to test build reproducibility
+
+Meson now ships with a command for testing whether your project can be
+[built reprodicibly](https://reproducible-builds.org/). It can be used
+by running a command like the following in the source root of your
+project:
+
+ meson reprotest --intermediaries -- --buildtype=debugoptimized
+
+All command line options after the `--` are passed to the build
+invocations directly.
+
+This tool is not meant to be exhaustive, but instead easy and
+convenient to run. It will detect some but definitely not all
+reproducibility issues.