diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-10-16 10:03:13 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-11-03 18:10:36 +0200 |
commit | 63f4f9481ebc865b11a06aeecf0c624104d46afd (patch) | |
tree | 13ff86bcf410ae872ebc1c33cac851104d21ecf0 /docs/markdown/Reference-manual.md | |
parent | 8cd7f7871bc99e5ed709d4f0ec54997047f3e335 (diff) | |
download | meson-63f4f9481ebc865b11a06aeecf0c624104d46afd.zip meson-63f4f9481ebc865b11a06aeecf0c624104d46afd.tar.gz meson-63f4f9481ebc865b11a06aeecf0c624104d46afd.tar.bz2 |
Add new compiler.get_argument_syntax method
Some compilers try very had to pretend they're another compiler (ICC
pretends to be GCC and Linux and MacOS, and MSVC on windows), Clang
behaves much like GCC, but now also has clang-cl, which behaves like MSVC.
This method provides an easy way to determine whether testing for MSVC
like arguments `/w1234` or gcc like arguments `-Wfoo` are likely to
succeed, without having to check for dozens of compilers and the host
operating system, (as you would otherwise have to do with ICC).
Diffstat (limited to 'docs/markdown/Reference-manual.md')
-rw-r--r-- | docs/markdown/Reference-manual.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index f43f1f6..72e9609 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -1702,6 +1702,13 @@ the following methods: - `get_id()` returns a string identifying the compiler. For example, `gcc`, `msvc`, [and more](Reference-tables.md#compiler-ids). +- `get_argument_syntax()` *(new in 0.49.0)* returns a string identifying the type + of arguments the compiler takes. Can be one of `gcc`, `msvc`, or an undefined + string value. This method is useful for identifying compilers that are not + gcc or msvc, but use the same argument syntax as one of those two compilers + such as clang or icc, especially when they use different syntax on different + operating systems. + - `get_supported_arguments(list_of_string)` *(added 0.43.0)* returns an array containing only the arguments supported by the compiler, as if `has_argument` were called on them individually. |