aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-02-14 10:05:42 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2016-02-17 20:22:34 +0200
commitdeff35eef60223b5df6497e61e0cdcf1ad81f09f (patch)
tree3f76df4a13d3b8dc4c43abe184c954e8896acae1 /mesonbuild/backend/backends.py
parent440d73902dc266ff25465d125b7f625e531b1225 (diff)
downloadmeson-deff35eef60223b5df6497e61e0cdcf1ad81f09f.zip
meson-deff35eef60223b5df6497e61e0cdcf1ad81f09f.tar.gz
meson-deff35eef60223b5df6497e61e0cdcf1ad81f09f.tar.bz2
Filter out UNIX flags from external deps when using the MSVC compiler
This is very useful to prevent compiler noise about invalid cflags; particularly for the -mms-bitfields cflag which most libraries send to the mingw-gcc compiler. More can be added later.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index d6b8e7c..8256cee 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -255,7 +255,9 @@ class Backend():
if isinstance(target, build.SharedLibrary):
commands += compiler.get_pic_args()
for dep in target.get_external_deps():
- commands += dep.get_compile_args()
+ # Cflags required by external deps might have UNIX-specific flags,
+ # so filter them out if needed
+ commands += compiler.unix_compile_flags_to_native(dep.get_compile_args())
if isinstance(target, build.Executable):
commands += dep.get_exe_args()