From 2c4ae87140cc719a7e94a59b421374bbeee898c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 5 Nov 2018 14:57:21 -0500 Subject: 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] = \ -- cgit v1.2.1