summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-11-16 15:27:44 +0100
committerDylan Baker <dylan@pnwbakers.com>2024-12-19 09:25:20 -0800
commit15c2c9811411e5e84419bcee487fb3a84ac2756c (patch)
tree1237a185415fec8135fad99b0d7b73fb82d0d6e4 /docs/markdown
parent8b9846d9a9d29b427860891c9b699eb4305e348b (diff)
downloadmeson-15c2c9811411e5e84419bcee487fb3a84ac2756c.tar.gz
introspect: add machine to target_sources
Even though the "targets" introspection info already includes the command line arguments used to invoke the compiler, this is not enough to correlated with the "compilers" introspection info and get extra information from there. Together with the existing "language" key, adding a "machine" key is enough to identify completely an entry in the compilers info. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/IDE-integration.md8
-rw-r--r--docs/markdown/snippets/introspect_machine.md5
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/IDE-integration.md b/docs/markdown/IDE-integration.md
index 77edb755d..ce8d8b42e 100644
--- a/docs/markdown/IDE-integration.md
+++ b/docs/markdown/IDE-integration.md
@@ -93,6 +93,7 @@ can provide code completion for all source files.
```json
{
"language": "language ID",
+ "machine": "build" / "host",
"compiler": ["The", "compiler", "command"],
"parameters": ["list", "of", "compiler", "parameters"],
"sources": ["list", "of", "all", "source", "files", "for", "this", "language"],
@@ -100,6 +101,13 @@ can provide code completion for all source files.
}
```
+*(New in 1.7.0)* The `machine` and `language` keys make it possible to
+to access further information about the compiler in the `compilers`
+introspection information. `machine` can be absent if `language` is
+`unknown`. In this case, information about the compiler is not
+available; Meson is therefore unable to know if the output relates
+to either the build of the host machine.
+
It should be noted that the compiler parameters stored in the
`parameters` differ from the actual parameters used to compile the
file. This is because the parameters are optimized for the usage in an
diff --git a/docs/markdown/snippets/introspect_machine.md b/docs/markdown/snippets/introspect_machine.md
new file mode 100644
index 000000000..9b19bd6a2
--- /dev/null
+++ b/docs/markdown/snippets/introspect_machine.md
@@ -0,0 +1,5 @@
+## "machine" entry in target introspection data
+
+The JSON data returned by `meson introspect --targets` now has a `machine`
+entry in each `target_sources` block. The new entry can be one of `build`
+or `host` for compiler-built targets, or absent for `custom_target` targets.