Commit fa61f322 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

genlib: Warn if using dlltool and support newer VS versions than 2010

If we generate .lib files with dlltool, they won't work very well with
Visual Studio and can result in missing symbols.

https://sourceware.org/bugzilla/show_bug.cgi?id=12633

https://bugzilla.gnome.org/show_bug.cgi?id=773889
parent d3cb1256
......@@ -20,6 +20,7 @@ import os
from cerbero.config import Architecture
from cerbero.utils import shell, to_unixpath
from cerbero.utils import messages as m
class GenLib(object):
......@@ -58,13 +59,17 @@ class GenLib(object):
arch = 'x64'
shell.call(self.LIB_TPL % (lib_path, defname, implib, arch), outputdir)
else:
m.warning("Using dlltool instead of lib.exe! Resulting .lib files"
" will have problems with Visual Studio, see "
" http://sourceware.org/bugzilla/show_bug.cgi?id=12633")
shell.call(self.DLLTOOL_TPL % (defname, implib, dllname), outputdir)
return os.path.join(outputdir, implib)
def _get_vc_tools_path(self):
if 'VS100COMNTOOLS' in os.environ:
path = os.path.join(os.environ['VS100COMNTOOLS'], '..', '..',
'VC', 'bin', 'amd64')
if os.path.exists (path):
return path
for version in ['100', '110', '120', '130', '140', '150']:
variable = 'VS{0}COMNTOOLS'.format(version)
if variable in os.environ:
path = os.path.join(os.environ[variable], '..', '..', 'VC', 'bin', 'amd64')
if os.path.exists (path):
return path
return None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment