hughsie / colord

Making color management just work
GNU General Public License v2.0
75 stars 51 forks source link

build: Fix linker argument checks #77

Closed lantw44 closed 6 years ago

lantw44 commented 6 years ago

Meson 0.46.0 adds has_link_argument to compiler objects, and we should use it instead of has_argument when checking linker arguments.

Fixes: https://github.com/hughsie/colord/issues/69

lantw44 commented 6 years ago

It seems that I have to wait a few days for meson 0.46.0 to be pushed to Fedora 27 stable, or tests always fail because of meson version.

hughsie commented 6 years ago

We probably need the same thing in fwupd, but that depends on meson >= 0.41 which is nowhere close to having that either.

lantw44 commented 6 years ago

We probably need the same thing in fwupd, but that depends on meson >= 0.41 which is nowhere close to having that either.

Do you mean that we can't raise the meson version requirement there? It should be possible to do the check in older versions with cc.links, and this is what I recommended GNOME Builder to do: https://gitlab.gnome.org/GNOME/gnome-builder/commit/428cc6b8. But I think cc. has_link_argument is still better and easier to use.

hughsie commented 6 years ago

We can, but perhaps not quite yet: e.g. see https://travis-ci.org/hughsie/fwupd/builds/372757166

lantw44 commented 6 years ago

Waiting for all major distributions to update meson may takes a long time ...

lantw44 commented 6 years ago

I updated the Dockerfile to Fedora 28 to get meson 0.46.