diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2020-07-30 09:21:53 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-08-18 14:47:38 -0400 |
commit | 1c403e20e70ac523216a31f977901fb815166b7a (patch) | |
tree | 97ea56fc22aa365acb931a7be8c0502890617661 /docs | |
parent | adfee4460a6a01de975b25e6faf9fd9261238ebd (diff) | |
download | meson-1c403e20e70ac523216a31f977901fb815166b7a.zip meson-1c403e20e70ac523216a31f977901fb815166b7a.tar.gz meson-1c403e20e70ac523216a31f977901fb815166b7a.tar.bz2 |
Interpreter: Fix c_stdlib usage
- Exceptions raised during subproject setup were ignored.
- Allow c_stdlib in native file, was already half supported.
- Eliminate usage of subproject variable name by overriding
'<lang>_stdlib' dependency name.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Cross-compilation.md | 14 | ||||
-rw-r--r-- | docs/markdown/snippets/stdlib.md | 6 |
2 files changed, 19 insertions, 1 deletions
diff --git a/docs/markdown/Cross-compilation.md b/docs/markdown/Cross-compilation.md index d86d417..c8cd728 100644 --- a/docs/markdown/Cross-compilation.md +++ b/docs/markdown/Cross-compilation.md @@ -268,7 +268,7 @@ invocation to use in your cross file is the following: ```ini [properties] -c_stdlib = ['mylibc', 'mylibc_dep'] # Subproject name, dependency name +c_stdlib = ['mylibc', 'mylibc_dep'] # Subproject name, variable name ``` This specifies that C standard library is provided in the Meson @@ -277,6 +277,18 @@ is used on every cross built C target in the entire source tree (including subprojects) and the standard library is disabled. The build definitions of these targets do not need any modification. +Note that it is supported for any language, not only `c`, using `<lang>_stdlib` +property. + +Since *0.56.0* the variable name parameter is no longer required as long as the +subproject calls `meson.override_dependency('c_stdlib', mylibc_dep)`. +The above example becomes: + +```ini +[properties] +c_stdlib = 'mylibc' +``` + ## Changing cross file settings Cross file settings are only read when the build directory is set up diff --git a/docs/markdown/snippets/stdlib.md b/docs/markdown/snippets/stdlib.md new file mode 100644 index 0000000..5e80dd5 --- /dev/null +++ b/docs/markdown/snippets/stdlib.md @@ -0,0 +1,6 @@ +## Custom standard library + +- It is not limited to cross builds any more, `<lang>_stdlib` property can be + set in native files. +- The variable name parameter is no longer required as long as the subproject + calls `meson.override_dependency('c_stdlib', mylibc_dep)`. |