diff options
| author | Andy MacGregor <amacgregor@veobot.com> | 2025-04-28 15:36:50 -0400 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-05-03 16:53:41 +0300 |
| commit | 41bda4385fc302dbcac1ee29469eadc9b1a3ac22 (patch) | |
| tree | c31dd65a6e7f1914af5467ce6221c7f6b6cf032f /docs/markdown/Cross-compilation.md | |
| parent | a16ec8b0fb6d7035b669a13edd4d97ff0c307a0b (diff) | |
| download | meson-41bda4385fc302dbcac1ee29469eadc9b1a3ac22.tar.gz | |
docs: disambiguate exe_wrapper
As of this commit, meson has three different
pathways to set an exe_wrapper field.
exe_wrapper set through `meson test --wrapper`
CLI arg or `add_test_setup()` meson function argument
are treated equally. Only one wrapper through either
of these routes may be set though.
The exe_wrapper field set in the cross file is handled
separately internally in mtest.py, and holds a little
more consequence over meson test behavior than the other
two fields.
Perhaps a future version of meson should treat these
fields equally and explicitly document how they are
combined.
For now, I think its a better first step to
document current behavior to generate discussion about
how exactly the future version should behave.
Diffstat (limited to 'docs/markdown/Cross-compilation.md')
| -rw-r--r-- | docs/markdown/Cross-compilation.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/Cross-compilation.md b/docs/markdown/Cross-compilation.md index 64196f3bd..533c24664 100644 --- a/docs/markdown/Cross-compilation.md +++ b/docs/markdown/Cross-compilation.md @@ -139,6 +139,22 @@ of a wrapper, these lines are all you need to write. Meson will automatically use the given wrapper when it needs to run host binaries. This happens e.g. when running the project's test suite. +Note that `exe_wrapper` in the cross file is handled separately +from the `exe_wrapper` argument in +[`add_test_setup`](Reference-manual_functions.md#add_test_setup_exe_wrapper) +and [`meson test --wrapper`](Unit-tests.md#other-test-options) +command line argument. Meson must have `exe_wrapper` specified in the +cross file or else it will skip tests that attempt to run cross +compiled binaries. Only the cross file `exe_wrapper` value will be +stored in the `MESON_EXE_WRAPPER` environment variable. If another +wrapper is given in the test setup with `exe_wrapper` or as a +`meson test --wrapper` command line argument, then meson will prepend +the additional wrapper before the cross file wrapper like the +following command: +``` +[prepend_wrapper] <cross_file_wrapper> <exe_binary> <args...> +``` + ### Properties In addition to the properties allowed in [all machine |
