[gobject-introspection] scanner: Pass library paths before the -l itself



commit 4996dbe140889c27702aba155e08d6e77213f98b
Author: Olivier CrĂȘte <olivier crete collabora com>
Date:   Mon Nov 5 14:57:21 2018 -0500

    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.

 giscanner/ccompiler.py | 22 +++++++++++-----------
 1 file 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] = \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]