diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-09-20 14:46:12 +0530 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2018-11-09 08:27:18 +0000 |
commit | 8ada66ee3594bbe6c5f359e6d9e67591e5f6cf43 (patch) | |
tree | a74de062666fde475302cf1d50141b41581a5e6f | |
parent | f7b76e72ab4457a57dd80832446c1a77f22da118 (diff) |
cerbero: Print reason why import library couldn't be created
Makes it easier for people to debug why it failed. The 'might be'
message is misleading and often wrong.
-rw-r--r-- | cerbero/build/recipe.py | 4 | ||||
-rw-r--r-- | cerbero/ide/vs/genlib.py | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/cerbero/build/recipe.py b/cerbero/build/recipe.py index aa2bb6f7..cc99a7da 100644 --- a/cerbero/build/recipe.py +++ b/cerbero/build/recipe.py @@ -234,8 +234,8 @@ class Recipe(FilesProvider): self.config.target_arch, output_dir) logging.debug('Created %s' % implib) - except: - m.warning("Could not create {}.lib, gendef might be missing".format(libname)) + except FatalError, e: + m.warning("Could not create {!r}: {}".format(genlib.implib, e.msg)) def recipe_dir(self): ''' diff --git a/cerbero/ide/vs/genlib.py b/cerbero/ide/vs/genlib.py index d25c9625..73a79c79 100644 --- a/cerbero/ide/vs/genlib.py +++ b/cerbero/ide/vs/genlib.py @@ -36,11 +36,12 @@ class GenLib(object): def create(self, libname, dllpath, arch, outputdir): bindir, dllname = os.path.split(dllpath) - # Create the .def file - shell.call('gendef %s' % dllpath, outputdir) - defname = dllname.replace('.dll', '.def') implib = '%s.lib' % libname[3:] + self.implib = implib + + # Create the .def file + shell.call('gendef %s' % dllpath, outputdir) # Create the import library vc_path = self._get_vc_tools_path() |