diff options
author | Martin Storsjö <martin@martin.st> | 2020-03-03 13:02:04 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-03-03 21:49:42 +0200 |
commit | 58db8d5e1134e3917b2fb20403624ac090f1f604 (patch) | |
tree | b3d980604bcbbeacf4b9118390346d73e1e840e7 /mesonbuild/compilers/c.py | |
parent | 98ddd52ceddb29e1c4164de47bfb2448ee1ebffe (diff) | |
download | meson-58db8d5e1134e3917b2fb20403624ac090f1f604.zip meson-58db8d5e1134e3917b2fb20403624ac090f1f604.tar.gz meson-58db8d5e1134e3917b2fb20403624ac090f1f604.tar.bz2 |
Set c_winlibs/cpp_winlibs for Clang in the same way as for GCC
clang-cl is handled as a separate case (ClangClCCompiler), which already
gets c_winlibs from VisualStudioLikeCCompilerMixin.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r-- | mesonbuild/compilers/c.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 87f48e6..a9ad585 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -108,6 +108,10 @@ class ClangCCompiler(ClangCompiler, CCompiler): opts.update({'c_std': coredata.UserComboOption('C language standard to use', ['none'] + c_stds + g_stds, 'none')}) + if self.info.is_windows() or self.info.is_cygwin(): + opts.update({ + 'c_winlibs': coredata.UserArrayOption('Standard Win libraries to link against', + gnu_winlibs), }) return opts def get_option_compile_args(self, options): @@ -118,6 +122,8 @@ class ClangCCompiler(ClangCompiler, CCompiler): return args def get_option_link_args(self, options): + if self.info.is_windows() or self.info.is_cygwin(): + return options['c_winlibs'].value[:] return [] |