29.05.2023 10:56, Michal Privoznik пишет:
While detecting a presence of a function via 'cc.links()'
gives desired result (i.e. detects whether function is present),
it also produces a warning on systems where the function is not
present, e.g.:

   qemu.git/build/meson-private/tmph74x3p38/testfile.c:2:34: \
   warning: implicit declaration of function 'malloc_trim' 
[-Wimplicit-function-declaration]

We can check whether given function exists via
'cc.has_function()' firstly.

This just slows down the configure step, it looks like.
Shouldn't we use cc.has_function() *instead* of our cc.links(),
but not both?

/mjt

Reply via email to