Skip to content
Commit 5d4cd252 authored by Chun-wei Fan's avatar Chun-wei Fan
Browse files

giscanner: Do not use distutils for linking

...the dumper program for all cases.  It turned out that using distutils
for linking is more troublesome than useful as we need to ensure that
the paths specified by -L need to come before the standard library search
paths, and distutil's ccompiler.add_library_path() and
ccompiler.add_runtime_library_path() does not work for all of its
supported compilers (Visual Studio is an example).

Instead, we go back to constructing our linker command line manually as
we did before (and as we now do in the libtool case), but with some
enhancements:

-Use '-libpath:' on Visual Studio builds, which corresponds to the -L flag
 on GCC/CLang.
-Extend LIB/PATH (Windows/Visual Studio) or LD_LIBRARY_PATH (other
 compilers/envs), which is necessary as we resolve the libraries that
 are passed into g-ir-scanner, at least on Windows.
-Don't attempt to link to or resolve m.lib on Visual Studio builds, as
 the math functions are in the standard CRT .lib/.dll, and there is no
 such thing as m.lib

https://bugzilla.gnome.org/show_bug.cgi?id=781525
parent 6b703b32
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment