[PATCH libdrm] meson: use pkg-config to detect libatomic_ops

Emil Velikov emil.l.velikov at gmail.com
Fri Mar 9 15:48:51 UTC 2018


On 9 March 2018 at 11:47, Eric Engestrom <eric.engestrom at imgtec.com> wrote:

>> > +       dep_atomic_ops = []
>> >
>> The dummy dep_atomic_ops is needed for almost all cases in the if/else
>> ladder. The exception being the .found() case.
>
> Actually, because of the way the `if` chain is written, the dep_atomic_ops
> has to be created before the list; in the `if` cases before this one,
> that dep might exist, but we don't need it. In the branch that uses it,
> if we got in the branch then it exists, and we need it. In the branches
> after that, it doesn't exist and we don't need it either.
>
> That means that only up to that branch can it contain anything;
> afterwards, it's empty anyway.
>
> And like I said, it only has the effect of maybe on the branches before
> adding unused flags to the compiler & linker, which shouldn't have any
> effect anyway.
>
Let me see if I get this right:

You're saying that when dep_atomic_ops.found() == false, the
dep_atomic_ops dependency listed in the respective will expand to
no-op.
I wasn't quite sure if that's the case, hence my pedantic suggestion ;-)

Makes sense though, rb still stands.

Thanks Eric!

-Emil


More information about the dri-devel mailing list