qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Target-dependent include path, why?


From: Paolo Bonzini
Subject: Re: Target-dependent include path, why?
Date: Fri, 9 Dec 2022 17:48:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

On 12/9/22 09:51, Markus Armbruster wrote:
Because of where [pixman] is added as a dependency in meson.build.

Is it added where it is for a reason, or is it accidental?

Dependencies are usually added near the .c files that use them. That's a bit messy of course if you have an "#include <>" in a heavily-included QEMU header. You can consider it a way to discourage heavily-included headers.

If you have a dependency in multiple unrelated .c files, specifying them in multiple foo_ss.add() invocations doesn't hurt. In fact it is both clearer and more compact, because it removes the need for "if"s.

The only dependency that you don't need to specify is glib, partly for historical pre-Meson reasons partly because it would be everywhere. For the others, if it makes sense to add them to multiple source sets you're welcome to do so.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]