diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-03-19 18:05:31 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-23 17:51:36 +0200 |
commit | 097dfc085e6a1bb3c670880134a52dcfca504be7 (patch) | |
tree | 28fee5185ded91d44542b70fe3f62bb72e29020a /docs/markdown/snippets | |
parent | 3a4388e51dee5e7e58f1e5ad4e60fb73b4aacf08 (diff) | |
download | meson-097dfc085e6a1bb3c670880134a52dcfca504be7.zip meson-097dfc085e6a1bb3c670880134a52dcfca504be7.tar.gz meson-097dfc085e6a1bb3c670880134a52dcfca504be7.tar.bz2 |
Naturally use env vars a bit more to match Autoconf
PR #6363 made it so our interpretation of env vars no longer clashed
with Autoconf's: if both Meson and Autoconf would read and env var, both
would do the same things with the value they read.
However, there were still cases that autoconf would read an env var when
meson wouldn't:
- Autoconf would use `CC` in cross builds too
- Autoconf would use `CC_FOR_BUILD` in native builds too.
There's no reason Meson can't also do this--if native cross files
overwrite rather than replace env vars, cross files can also overwrite
rather than replace env vars.
Because variables like `CC` are so ubiquitous, and because ignoring them
in cross builds just makes those builds liable to break (and things more
complicated in general), we bring Meson's behavior in line with
Autoconf's.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/env_vars_and_cross.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/markdown/snippets/env_vars_and_cross.md b/docs/markdown/snippets/env_vars_and_cross.md index 61a63f3..f4340de 100644 --- a/docs/markdown/snippets/env_vars_and_cross.md +++ b/docs/markdown/snippets/env_vars_and_cross.md @@ -2,11 +2,11 @@ Previously in Meson, variables like `CC` effected both the host and build platforms for native builds, but the just the build platform for cross builds. -Now `CC_FOR_BUILD` is used for the build platform in cross builds. +Now `CC` always effects the host platform, and `CC_FOR_BUILD` always affects +the build platform, with `CC` also effecting the build platform for native +builds only when `CC_FOR_BUILD` is not defined. This old behavior is inconsistent with the way Autotools works, which undermines the purpose of distro-integration that is the only reason -environment variables are supported at all in Meson. The new behavior is not -quite the same, but doesn't conflict: meson doesn't always repond to an -environment when Autoconf would, but when it does it interprets it as Autotools -would. +environment variables are supported at all in Meson. The new behavior is +consistent. |