diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-09 01:20:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-09 01:20:57 +0200 |
commit | 5c51d4521ab37edce88c61fd5067c93a44078854 (patch) | |
tree | 51910cba73b3017087fc13b6bdb64afd3bd4e09e /docs/markdown/snippets | |
parent | 3a57e5177ba949cff5f971f7338a1c75a2724ac2 (diff) | |
parent | 48e5c1234ad4dd0438324ab8164f94d12a8c2218 (diff) | |
download | meson-5c51d4521ab37edce88c61fd5067c93a44078854.zip meson-5c51d4521ab37edce88c61fd5067c93a44078854.tar.gz meson-5c51d4521ab37edce88c61fd5067c93a44078854.tar.bz2 |
Merge pull request #6532 from jon-turney/languages-native-kwarg
Add add_languages(native:)
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/native_compiler_not_required.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/markdown/snippets/native_compiler_not_required.md b/docs/markdown/snippets/native_compiler_not_required.md new file mode 100644 index 0000000..331b3c7 --- /dev/null +++ b/docs/markdown/snippets/native_compiler_not_required.md @@ -0,0 +1,20 @@ +## Native (build machine) compilers not always required + +`add_languages()` gained a `native:` keyword, indicating if a native or cross +compiler is to be used. + +For the benefit of existing simple build definitions which don't contain any +`native: true` targets, without breaking backwards compatibility for build +definitions which assume that the native compiler is available after +`add_languages()`, if the `native:` keyword is absent the languages may be used +for either the build or host machine, but are never required for the build +machine. + +This changes the behaviour of the following meson fragment (when cross-compiling +but a native compiler is not available) from reporting an error at +`add_language` to reporting an error at `executable`. + +``` +add_language('c') +executable('main', 'main.c', native: true) +``` |