summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-12-02 02:41:37 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2017-12-03 10:06:11 +0530
commit3851867a0634c5bd064f3e06ee796b6d17082975 (patch)
treef6905b7a53a2929797edb6b4978b40a7fdce76a7
parent4e637a69106acf3cc0dcdec6085dc797cad6bfef (diff)
downloadmeson-3851867a0634c5bd064f3e06ee796b6d17082975.tar.gz
dependencies: Always convert MinGW paths to MSVC on Windows
The MinGW toolchain can read MinGW paths, but Python cannot and we sometimes need to parse the libs and cflags manually (for static-only library searching, for instance). The MinGW toolchain can always read Windows paths with `/` as path separater, so just use that.
-rw-r--r--mesonbuild/dependencies/base.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index d347735ec..cdeaf5edb 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -414,11 +414,12 @@ class PkgConfigDependency(ExternalDependency):
def _convert_mingw_paths(self, args):
'''
- MSVC cannot handle MinGW-esque /c/foo paths, convert them to C:/foo.
- We cannot resolve other paths starting with / like /home/foo so leave
- them as-is so the user gets an error/warning from the compiler/linker.
+ Both MSVC and native Python on Windows cannot handle MinGW-esque /c/foo
+ paths so convert them to C:/foo. We cannot resolve other paths starting
+ with / like /home/foo so leave them as-is so that the user gets an
+ error/warning from the compiler/linker.
'''
- if not self.compiler or self.compiler.id != 'msvc':
+ if not mesonlib.is_windows():
return args
converted = []
for arg in args: