aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cpp.py
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-03-03 13:02:04 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-03-03 21:49:42 +0200
commit58db8d5e1134e3917b2fb20403624ac090f1f604 (patch)
treeb3d980604bcbbeacf4b9118390346d73e1e840e7 /mesonbuild/compilers/cpp.py
parent98ddd52ceddb29e1c4164de47bfb2448ee1ebffe (diff)
downloadmeson-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/cpp.py')
-rw-r--r--mesonbuild/compilers/cpp.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py
index bdca596..26b34e3 100644
--- a/mesonbuild/compilers/cpp.py
+++ b/mesonbuild/compilers/cpp.py
@@ -174,6 +174,10 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
['none', 'c++98', 'c++03', 'c++11', 'c++14', 'c++17', 'c++1z', 'c++2a',
'gnu++11', 'gnu++14', 'gnu++17', 'gnu++1z', 'gnu++2a'],
'none')})
+ if self.info.is_windows() or self.info.is_cygwin():
+ opts.update({
+ 'cpp_winlibs': coredata.UserArrayOption('Standard Win libraries to link against',
+ gnu_winlibs), })
return opts
def get_option_compile_args(self, options):
@@ -190,6 +194,8 @@ class ClangCPPCompiler(ClangCompiler, CPPCompiler):
return args
def get_option_link_args(self, options):
+ if self.info.is_windows() or self.info.is_cygwin():
+ return options['cpp_winlibs'].value[:]
return []
def language_stdlib_only_link_flags(self):