aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Reference-tables.md
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-09 20:38:46 -0400
committerDylan Baker <dylan@pnwbakers.com>2020-06-12 10:35:11 -0700
commit58c2aeb5e433ae7652488d53021c40db1712dea5 (patch)
tree3b0bd9d80561fb6adf8608f145e8f3d6ccc825a1 /docs/markdown/Reference-tables.md
parent49a974213c998937bcefe43622bb24d84666c4f2 (diff)
downloadmeson-58c2aeb5e433ae7652488d53021c40db1712dea5.zip
meson-58c2aeb5e433ae7652488d53021c40db1712dea5.tar.gz
meson-58c2aeb5e433ae7652488d53021c40db1712dea5.tar.bz2
[skip ci] docs: Bring up to date on options per machine
I tried to fix the docs when the stuff was added, but it turns out I missed things, as noted in https://github.com/mesonbuild/meson/issues/7284#issuecomment-641641177
Diffstat (limited to 'docs/markdown/Reference-tables.md')
-rw-r--r--docs/markdown/Reference-tables.md37
1 files changed, 36 insertions, 1 deletions
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md
index 60a9720..81ce921 100644
--- a/docs/markdown/Reference-tables.md
+++ b/docs/markdown/Reference-tables.md
@@ -155,6 +155,10 @@ These are the parameter names for passing language specific arguments to your bu
| Rust | rust_args | rust_link_args |
| Vala | vala_args | vala_link_args |
+All these `<lang>_*` options are specified per machine. See in [specifying
+options per machine](Builtin-options.md#Specifying-options-per-machine) for on
+how to do this in cross builds.
+
## Compiler and linker flag environment variables
These environment variables will be used to modify the compiler and
@@ -177,6 +181,10 @@ instead.
| RUSTFLAGS | Flags for the Rust compiler |
| LDFLAGS | The linker flags, used for all languages |
+N.B. these settings are specified per machine, and so the environment varibles
+actually come in pairs. See the [environment variables per
+machine](#Environment-variables-per-machine) section for details.
+
## Function Attributes
These are the parameters names that are supported using
@@ -267,6 +275,10 @@ These are the values that can be passed to `dependency` function's
## Compiler and Linker selection variables
+N.B. these settings are specified per machine, and so the environment varibles
+actually come in pairs. See the [environment variables per
+machine](#Environment-variables-per-machine) section for details.
+
| Language | Compiler | Linker | Note |
|---------------|----------|-----------|---------------------------------------------|
| C | CC | CC_LD | |
@@ -280,5 +292,28 @@ These are the values that can be passed to `dependency` function's
| C# | CSC | CSC | The linker is the compiler |
*The old environment variales are still supported, but are deprecated and will
-be removed in a future version of meson.
+be removed in a future version of meson.*
+
+## Environment variables per machine
+
+Since *0.54.0*, Following Autotool and other legacy build systems, environment
+variables that affect machine-specific settings come in pairs: for every bare
+environment variable `FOO`, there is a suffixed `FOO_FOR_BUILD`, where `FOO`
+just affects the host machine configuration, while `FOO_FOR_BUILD` just affects
+the build machine configuration. For example:
+
+ - `PKG_CONFIG_PATH_FOR_BUILD` controls the paths pkg-config will search for
+ just `native: true` dependencies (build machine).
+
+ - `PKG_CONFIG_PATH` controls the paths pkg-config will search for just
+ `native: false` dependencies (host machine).
+
+This mirrors the `build.` prefix used for (built-in) meson options, which has
+the same meaning.
+
+This is useful for cross builds. In the native builds, build = host, and the
+unsuffixed environment variables alone will suffice.
+Prior to *0.54.0*, there was no `_FOR_BUILD`-suffixed variables, and most
+environment variables only effected native machine configurations, though this
+wasn't consistent (e.g. `PKG_CONFIG_PATH` still affected cross builds).