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 /mesonbuild/compilers/c.py | |
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 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index a6ae4af..9b24e85 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -1543,6 +1543,9 @@ class VisualStudioCCompiler(CCompiler): # false without compiling anything return name in ['dllimport', 'dllexport'] + def get_argument_syntax(self): + return 'msvc' + class ArmCCompiler(ArmCompiler, CCompiler): def __init__(self, exelist, version, compiler_type, is_cross, exe_wrapper=None, **kwargs): |