On Wed, Oct 30, 2024, 1:03 PM Paolo Bonzini <pbonz...@redhat.com> wrote:

> On Tue, Oct 29, 2024 at 9:08 PM Dorjoy Chowdhury <dorjoychy...@gmail.com>
> wrote:
> > Thanks for fixing. The attached patch looks great to me. I just have
> > one suggestion. Now that the CONFIG_* symbols have the dependencies
> > listed explicitly in the Kconfig files, maybe we don't need the
> > explicit dependencies in the meson.build files? For example, the
> > following line in hw/core/meson.build file:
> > system_ss.add(when: 'CONFIG_EIF', if_true: [files('eif.c'), zlib,
> > libcbor, gnutls])
> > can be changed to:
> > system_ss.add(when: 'CONFIG_EIF', if_true: [files('eif.c')])
> >
> > I am not sure if zlib is a required dependency for QEMU, probably not
> > needed to be listed above as well. I am just guessing.
>
> No, because the dependencies are not automatically added to all
> compiler and linker commands.  Having them in the "add" call lets the
> compiler find include files and the linker add the dependency to the
> executable.
>
> As an aside,
>
>   if foo.found()
>     system_ss.add(files('x.c'))
>   endif
>
> can be written
>
>   system_ss.add(when: foo, if_true: files('x.c'))
>
> and "when:" supports multiple entries.  But in this case it's okay to
> put it only in "if_true", since the dependency is handled in the
> Kconfig files and guaranteed to be present.
>

Understood. All good then. Thanks!

Regards,
Dorjoy

Reply via email to