summaryrefslogtreecommitdiff
path: root/giscanner/ccompiler.py
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2016-11-17 12:01:14 -0300
committerColin Walters <walters@verbum.org>2016-12-10 10:44:23 -0500
commiteea2447c4e4c1c98fda3ba212a9a9bbcc8655c90 (patch)
treed1f6e49563bdb0b8e9a497e1f3142d019992e681 /giscanner/ccompiler.py
parent36d1a22eefa5020ba75002a2b0c348017c7ab2e3 (diff)
downloadgobject-introspection-eea2447c4e4c1c98fda3ba212a9a9bbcc8655c90.tar.gz
scanner: Add a way to specify extra libraries to link against
Currently the only way to get a library to link against the dumper program is through '--link' which implies that library will be defined in the 'libraries' field of the .gir. When using libtool, we link against dependencies of that library as the .la defines that, but when using --no-libtool that won't happen and the user needs to be able to define to what other libraries the program needs to be link against, and this is what the new --extra-library argument is about. https://bugzilla.gnome.org/show_bug.cgi?id=774625
Diffstat (limited to 'giscanner/ccompiler.py')
-rw-r--r--giscanner/ccompiler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py
index 57df9d6a..11bc9fc4 100644
--- a/giscanner/ccompiler.py
+++ b/giscanner/ccompiler.py
@@ -108,14 +108,14 @@ class CCompiler(object):
self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations"
- def get_internal_link_flags(self, args, libtool, libraries, libpaths):
+ def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths):
# An "internal" link is where the library to be introspected
# is being built in the current directory.
if not libtool:
# non-libtool case: prepare distutils use
if self.check_is_msvc():
- for library in libraries:
+ for library in libraries + extra_libraries:
# MSVC Builds don't use libtool, so no .la libraries,
# so just add the library directly.
self.compiler.add_library(library)
@@ -136,7 +136,7 @@ class CCompiler(object):
if sys.platform != 'darwin':
args.append('-Wl,--no-as-needed')
- for library in libraries:
+ for library in libraries + extra_libraries:
self.compiler.add_library(library)
if not self.check_is_msvc():
for library_path in libpaths: