diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2018-01-03 17:02:01 +0200 |
---|---|---|
committer | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-12-13 17:07:51 +0100 |
commit | 48f41930a773bdd48b9664b2fc5b1e45d6bc5688 (patch) | |
tree | a4e625bba2dcd95dfb61c760ac14106941fc3add /giscanner/ccompiler.py | |
parent | 3d4ed1dbccd3b7cf379fdff263be2af58fd35807 (diff) | |
download | gobject-introspection-48f41930a773bdd48b9664b2fc5b1e45d6bc5688.tar.gz |
giscanner: add a --lib-dirs-envvar option
By default LD_LIBRARY_PATH is set to the list of target library paths;
this breaks down in cross-compilation environment, as we need to run a
native emulation wrapper rather than the target binary itself. This patch
allows exporting those paths to a different environment variable
which can be picked up and used by the wrapper.
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Diffstat (limited to 'giscanner/ccompiler.py')
-rw-r--r-- | giscanner/ccompiler.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/ccompiler.py b/giscanner/ccompiler.py index 4ad572c3..a81d4b86 100644 --- a/giscanner/ccompiler.py +++ b/giscanner/ccompiler.py @@ -174,7 +174,7 @@ class CCompiler(object): self._cflags_no_deprecation_warnings = "-Wno-deprecated-declarations" - def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths): + def get_internal_link_flags(self, args, libtool, libraries, extra_libraries, libpaths, lib_dirs_envvar): # An "internal" link is where the library to be introspected # is being built in the current directory. @@ -184,7 +184,7 @@ class CCompiler(object): if os.name == 'nt': runtime_path_envvar = ['LIB', 'PATH'] else: - runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] + runtime_path_envvar = ['LD_LIBRARY_PATH', 'DYLD_FALLBACK_LIBRARY_PATH'] if not lib_dirs_envvar else [lib_dirs_envvar] # Search the current directory first # (This flag is not supported nor needed for Visual C++) args.append('-L.') |