summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-04-05 18:21:29 +0200
committerDavid Robillard <d@drobilla.net>2020-04-05 18:24:55 +0200
commitf0bc33348b833b26697df5ba8cd1f9bf5dd9b3c4 (patch)
tree9b0427f9a11dbeaecf61f0ecb8c5ebd7eda6bb47
parent569d532e011bcad1ac308391e6d00b1b28789c10 (diff)
downloadautowaf-f0bc33348b833b26697df5ba8cd1f9bf5dd9b3c4.tar.gz
autowaf-f0bc33348b833b26697df5ba8cd1f9bf5dd9b3c4.tar.bz2
autowaf-f0bc33348b833b26697df5ba8cd1f9bf5dd9b3c4.zip
Hack MSVC static library paths to avoid clashes
The default waf configuration uses .lib for both static libraries and the manifest for DLLs, which is (somehow) the convention on Windows, but causes build errors because multiple targets produce the same outputs. Switch to using the UNIX convention ".a" (which is not unheard of on Windows, and is the approach used by Meson) to avoid this problem.
-rw-r--r--Tools/msvc.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Tools/msvc.py b/Tools/msvc.py
index f169c7f..26ca7b2 100644
--- a/Tools/msvc.py
+++ b/Tools/msvc.py
@@ -723,6 +723,10 @@ def libname_msvc(self, libname, is_static=False):
_libpaths = self.env.LIBPATH
static_libs=[
+ 'lib%ss.a' % lib,
+ 'lib%s.a' % lib,
+ '%ss.a' % lib,
+ '%s.a' %lib,
'lib%ss.lib' % lib,
'lib%s.lib' % lib,
'%ss.lib' % lib,
@@ -922,7 +926,7 @@ def msvc_common_flags(conf):
v.LIB_ST = '%s.lib'
v.LIBPATH_ST = '/LIBPATH:%s'
- v.STLIB_ST = '%s.lib'
+ v.STLIB_ST = '%s.a'
v.STLIBPATH_ST = '/LIBPATH:%s'
if v.MSVC_MANIFEST:
@@ -936,7 +940,7 @@ def msvc_common_flags(conf):
v.IMPLIB_ST = '/IMPLIB:%s'
v.LINKFLAGS_cstlib = []
- v.cstlib_PATTERN = v.cxxstlib_PATTERN = '%s.lib'
+ v.cstlib_PATTERN = v.cxxstlib_PATTERN = '%s.a'
v.cprogram_PATTERN = v.cxxprogram_PATTERN = '%s.exe'