[gobject-introspection] scanner: Fix library lookup under MinGW without libtool
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] scanner: Fix library lookup under MinGW without libtool
- Date: Mon, 22 Jan 2018 23:33:09 +0000 (UTC)
commit e56d70da837bd309bf8cddbce309a5a773e098b6
Author: Christoph Reiter <reiter christoph gmail com>
Date: Mon Jan 22 11:20:49 2018 +0100
scanner: Fix library lookup under MinGW without libtool
When executing the scanner binary use the PATH/LIB env vars
also under MinGW, since LD_LIBRARY_PATH/rpath doesn't work there.
When resolving the library name from the import library look into
the user provided library paths first before falling back to the
default gcc search path.
This fixes the gir/typelib generation for meson under MSYS2.
Note that MSYS2 ships various patches, so this might not fix it
for all MinGW users.
https://bugzilla.gnome.org/show_bug.cgi?id=791902
giscanner/ccompiler.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index 29de0ee..a8bd5b1 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -116,7 +116,7 @@ class CCompiler(object):
runtime_path_envvar = []
runtime_paths = []
- if self.check_is_msvc():
+ if os.name == 'nt':
runtime_path_envvar = ['LIB', 'PATH']
else:
runtime_path_envvar = ['LD_LIBRARY_PATH']
@@ -288,9 +288,10 @@ class CCompiler(object):
proc = subprocess.Popen([self.compiler_cmd, '-print-search-dirs'],
stdout=subprocess.PIPE)
o, e = proc.communicate()
+ libsearch = options.library_paths
for line in o.decode('ascii').splitlines():
if line.startswith('libraries: '):
- libsearch = line[len('libraries: '):].split(os.pathsep)
+ libsearch += line[len('libraries: '):].split(os.pathsep)
shlibs = []
not_resolved = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]