summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2018-11-05 14:57:21 -0500
committerChristoph Reiter <reiter.christoph@gmail.com>2018-11-06 14:51:16 +0100
commit2c4ae87140cc719a7e94a59b421374bbeee898c2 (patch)
tree03407b42df59504ac41aa1ef31a7d12e575ff185
parentfdaa3b1a14913c0e54baa98362c88e29691143d0 (diff)
downloadgobject-introspection-2c4ae87140cc719a7e94a59b421374bbeee898c2.tar.gz
scanner: Pass library paths before the -l itself
Without this, it will probably take the system library instead of the one that we are trying to test.
-rw-r--r--giscanner/ccompiler.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index c0038285..78e3825f 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -133,17 +133,6 @@ class CCompiler(object):
if sys.platform != 'darwin':
args.append('-Wl,--no-as-needed')
- for library in libraries + extra_libraries:
- if self.check_is_msvc():
- # Note that Visual Studio builds do not use libtool!
- if library != 'm':
- args.append(library + '.lib')
- else:
- if library.endswith(".la"): # explicitly specified libtool library
- args.append(library)
- else:
- args.append('-l' + library)
-
for library_path in libpaths:
# The dumper program needs to look for dynamic libraries
# in the library paths first
@@ -161,6 +150,17 @@ class CCompiler(object):
runtime_paths.append(library_path)
+ for library in libraries + extra_libraries:
+ if self.check_is_msvc():
+ # Note that Visual Studio builds do not use libtool!
+ if library != 'm':
+ args.append(library + '.lib')
+ else:
+ if library.endswith(".la"): # explicitly specified libtool library
+ args.append(library)
+ else:
+ args.append('-l' + library)
+
for envvar in runtime_path_envvar:
if envvar in os.environ:
os.environ[envvar] = \