aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFloris Bruynooghe <flub@google.com>2018-11-18 15:35:25 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2018-11-22 22:31:19 +0200
commite629a4ad1d4d2b9942ff44894b8aaaa05146e033 (patch)
treee096682936da5c01c9b53b134d714ef1e6a9f8eb /docs
parent50d5bcff87518cb350bfaba3be69b7e95c42a3c4 (diff)
downloadmeson-e629a4ad1d4d2b9942ff44894b8aaaa05146e033.zip
meson-e629a4ad1d4d2b9942ff44894b8aaaa05146e033.tar.gz
meson-e629a4ad1d4d2b9942ff44894b8aaaa05146e033.tar.bz2
[skip ci] Document CFLAGS and friends in main docs
Currently this is only partially documented in the quick-start guide, include this in the main docs and document all the environment argumens used.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-tables.md13
-rw-r--r--docs/markdown/Running-Meson.md16
2 files changed, 29 insertions, 0 deletions
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md
index d48458d..b561e86 100644
--- a/docs/markdown/Reference-tables.md
+++ b/docs/markdown/Reference-tables.md
@@ -111,6 +111,19 @@ These are the parameter names for passing language specific arguments to your bu
| Rust | rust_args |
| Vala | vala_args |
+## Compiler and linker flag environment variables
+
+These environment variables will be used to modify the compiler and
+linker flags.
+
+| CFLAGS | Flags for the C compiler |
+| CXXFLAGS | Flags for the C++ compiler |
+| OBJCFLAGS | Flags for the Objective C compiler |
+| FFLAGS | Flags for the Fortran compiler |
+| DFLAGS | Flags for the D compiler |
+| VALAFLAGS | Flags for the Vala compiler |
+| RUSTFLAGS | Flags for the Rust compiler |
+| LDFLAGS | The linker flags, used for all languages |
## Function Attributes
diff --git a/docs/markdown/Running-Meson.md b/docs/markdown/Running-Meson.md
index 00b70ed..426e87d 100644
--- a/docs/markdown/Running-Meson.md
+++ b/docs/markdown/Running-Meson.md
@@ -92,6 +92,22 @@ You can then open the generated solution with Visual Studio and
compile it in the usual way. A list of backends can be obtained with
`meson --help`.
+Environment Variables
+--
+
+Sometimes you want to add extra compiler flags, this can be done by
+passing them in environment variables when calling meson. See [the
+reference
+tables](Reference-tables.md#compiler-and-linker-flag-envrionment-variables)
+for a list of all the environment variables. Be aware however these
+environment variables are only used for the native compiler and will
+not affect the compiler used for cross-compiling, where the flags
+specified in the cross file will be used.
+
+Furthermore it is possible to stop meson from adding flags itself by
+using the `--buildtype=plain` option, in this case you must provide
+the full compiler and linker arguments needed.
+
Building the source
==