aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.py
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2018-04-22 22:38:18 +0800
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-07-01 21:54:09 +0000
commitcb36add970d448f8b4ace7e4dc6028e5441bccd7 (patch)
tree886ea5b0eeb6b9ecf91b4cd34cbf465884a95a77 /mesonbuild/mesonlib.py
parentcb2e4877da1469098a5e252385a3aa7f63b18026 (diff)
downloadmeson-cb36add970d448f8b4ace7e4dc6028e5441bccd7.zip
meson-cb36add970d448f8b4ace7e4dc6028e5441bccd7.tar.gz
meson-cb36add970d448f8b4ace7e4dc6028e5441bccd7.tar.bz2
gnome: Distinguish between internal and external linker flags
When an older version of the library being built is installed in the same prefix as external dependencies, we have to be careful to construct the linker or compiler command line. If a -L flag from external dependencoes comes before a -L flag pointing to builddir, it is possible for the linker to load older libraries from the installation prefix instead of the newly built ones, which is likely to cause undefined reference error. Since the order of dependencies is not significant, we cannot expect internal dependencies to appear before external dependencies when recursively iterating the list of dependencies. To make it harder to make mistakes, linker flags come from internal and external dependencies are now stored in different order sets. Code using _get_dependencies_flags are expected to follow the order when constructing linker command line: 1. Internal linker flags 2. LDFLAGS set by users 3. External linker flags It is similar to what automake and libtool do for autotools projects.
Diffstat (limited to 'mesonbuild/mesonlib.py')
0 files changed, 0 insertions, 0 deletions