aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Cross-compilation.md7
-rw-r--r--docs/markdown/Reference-manual.md19
-rw-r--r--docs/markdown/howtox.md10
-rw-r--r--docs/markdown/snippets/can_run_host_binaries.md5
-rw-r--r--docs/markdown/snippets/d-lang_n_debug.md4
-rw-r--r--docs/markdown/snippets/exe_wrapper_for_cross_built_tests.md9
-rw-r--r--docs/markdown/snippets/rpath_behavior.md7
7 files changed, 48 insertions, 13 deletions
diff --git a/docs/markdown/Cross-compilation.md b/docs/markdown/Cross-compilation.md
index 4c4b7bf..1c53dcf 100644
--- a/docs/markdown/Cross-compilation.md
+++ b/docs/markdown/Cross-compilation.md
@@ -231,13 +231,10 @@ The main *meson* object provides two functions to determine cross
compilation status.
```meson
-meson.is_cross_build() # returns true when cross compiling
-meson.has_exe_wrapper() # returns true if an exe wrapper has been defined
+meson.is_cross_build() # returns true when cross compiling
+meson.can_run_host_binaries() # returns true if the host binaries can be run, either with a wrapper or natively
```
-Note that the latter gives undefined return value when doing a native
-build.
-
You can run system checks on both the system compiler or the cross
compiler. You just have to specify which one to use.
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 97d3e83..9b5d657 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1613,6 +1613,13 @@ object](#build-target-object) returned by
object](#external-program-object) returned by
[`find_program()`](#find_program).
+*Since 0.55.0* When cross compiling, if an exe_wrapper is needed and defined
+the environment variable `MESON_EXE_WRAPPER` will be set to the string value
+of that wrapper (implementation detail: using `mesonlib.join_args`). Test
+scripts may use this to run cross built binaries. If your test needs
+`MESON_EXE_WRAPPER` in cross build situations it is your responsibility to
+return code 77 to tell the harness to report "skip"
+
By default, environment variable
[`MALLOC_PERTURB_`](http://man7.org/linux/man-pages/man3/mallopt.3.html)
is automatically set by `meson test` to a random value between 1..255.
@@ -1836,10 +1843,14 @@ the following methods.
If `native: false` or not specified, variable is retrieved from the
cross-file if cross-compiling, and from the native-file when not cross-compiling.
-- `has_exe_wrapper()` returns true when doing a cross build if there
- is a wrapper command that can be used to execute cross built
- binaries (for example when cross compiling from Linux to Windows,
- one can use `wine` as the wrapper).
+- `can_run_host_binaries()` returns true if the build machine can run
+ binaries compiled for the host. This returns true unless you are
+ cross compiling, need a helper to run host binaries, and don't have one.
+ For example when cross compiling from Linux to Windows, one can use `wine`
+ as the helper. *New in 0.55.0*
+
+- `has_exe_wrapper()` alias of `can_run_host_binaries`
+ *Deprecated since 0.55.0*
- `install_dependency_manifest(output_name)` installs a manifest file
containing a list of all subprojects, their versions and license
diff --git a/docs/markdown/howtox.md b/docs/markdown/howtox.md
index abf7519..84546b7 100644
--- a/docs/markdown/howtox.md
+++ b/docs/markdown/howtox.md
@@ -271,6 +271,7 @@ This can be used in cases where you want a default value, but might override it
later.
```meson
+# Not needed on Windows!
my_dep = dependency('', required : false)
if host_machine.system() in ['freebsd', 'netbsd', 'openbsd', 'dragonfly']
my_dep = dependency('some dep', required : false)
@@ -278,8 +279,9 @@ elif host_machine.system() == 'linux'
my_dep = dependency('some other dep', required : false)
endif
-# Last ditch effort!
-if no my_dep.found()
- my_dep = meson.get_compiler('c').find_library('dep')
-endif
+executable(
+ 'myexe',
+ my_sources,
+ deps : [my_dep]
+)
```
diff --git a/docs/markdown/snippets/can_run_host_binaries.md b/docs/markdown/snippets/can_run_host_binaries.md
new file mode 100644
index 0000000..0108184
--- /dev/null
+++ b/docs/markdown/snippets/can_run_host_binaries.md
@@ -0,0 +1,5 @@
+## Rename has_exe_wrapper -> can_run_host_binaries
+
+The old name was confusing as it didn't really match the behavior of the
+function. The old name remains as an alias (the behavior hasn't changed), but
+is now deprecated.
diff --git a/docs/markdown/snippets/d-lang_n_debug.md b/docs/markdown/snippets/d-lang_n_debug.md
new file mode 100644
index 0000000..59f09e4
--- /dev/null
+++ b/docs/markdown/snippets/d-lang_n_debug.md
@@ -0,0 +1,4 @@
+## b_ndebug support for D language compilers
+
+D Language compilers will now set -release/--release/-frelease (depending on
+the compiler) when the b_ndebug flag is set.
diff --git a/docs/markdown/snippets/exe_wrapper_for_cross_built_tests.md b/docs/markdown/snippets/exe_wrapper_for_cross_built_tests.md
new file mode 100644
index 0000000..ebdd8a7
--- /dev/null
+++ b/docs/markdown/snippets/exe_wrapper_for_cross_built_tests.md
@@ -0,0 +1,9 @@
+## Test scripts are given the exe wrapper if needed
+
+Meson will now set the `MESON_EXE_WRAPPER` as the properly wrapped and joined
+representation. For Unix-like OSes this means python's shelx.join, on Windows
+an implementation that attempts to properly quote windows argument is used.
+This allow wrapper scripts to run test binaries, instead of just skipping.
+
+for example, if the wrapper is `['emulator', '--script']`, it will be passed
+as `MESON_EXE_WRAPPER="emulator --script"`.
diff --git a/docs/markdown/snippets/rpath_behavior.md b/docs/markdown/snippets/rpath_behavior.md
new file mode 100644
index 0000000..c46f0c2
--- /dev/null
+++ b/docs/markdown/snippets/rpath_behavior.md
@@ -0,0 +1,7 @@
+## rpath removal now more careful
+
+On Linux-like systems, meson adds rpath entries to allow running apps
+in the build tree, and then removes those build-time-only
+rpath entries when installing. Rpath entries may also come
+in via LDFLAGS and via .pc files. Meson used to remove those
+latter rpath entries by accident, but is now more careful.