gnome: Always use an ordered set to store LDFLAGS

The order of -L flags in LDFLAGS is critical to the build. Any
unexpected reordering can cause undefined reference error when linking.
pull/2800/head
Ting-Wei Lan 7 years ago
parent ab2f68ec9c
commit 7b4bcdf21e
  1. 2
      mesonbuild/modules/gnome.py

@ -372,7 +372,7 @@ class GnomeModule(ExtensionModule):
continue continue
if gir_has_extra_lib_arg() and use_gir_args: if gir_has_extra_lib_arg() and use_gir_args:
fixed_ldflags = set() fixed_ldflags = OrderedSet()
for ldflag in ldflags: for ldflag in ldflags:
if ldflag.startswith("-l"): if ldflag.startswith("-l"):
fixed_ldflags.add(ldflag.replace('-l', '--extra-library=', 1)) fixed_ldflags.add(ldflag.replace('-l', '--extra-library=', 1))

Loading…
Cancel
Save