freetype-devel
[Top][All Lists]
Advanced

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

Re: about the meson build systel


From: David Turner
Subject: Re: about the meson build systel
Date: Mon, 24 Aug 2020 23:27:11 +0200



Le lun. 24 août 2020 à 22:34, Werner LEMBERG <wl@gnu.org> a écrit :

Hello David,


> - builds/meson/ftconfig.h.in: template versions of
>   ftconfig.h to be used by the Meson build. It is processed
>   by Meson, which will turn #mesondefine statements into
>   #define / #undef depending on build configuration.

having a meson-specific `ftconfig.h.in` file is not ideal.  I think we
should avoid that.
 
Please change that.  A simple solution could be to always create
`ftconfig.h` from a template even for a `make devel` or an autoconf
build.

I was just trying to reproduce what we're currently doing with builds/unix/ftconfig.h.in. I agree this is far from ideal though.

I propose to get rid of this template entirely for Meson, by defining HAVE_UNISTD_H and HAVE_FCNTL_H
as simple compiler arguments when building the library. There is really little reason for these to appear in ftconfig.h anyway.

For the builds/unix/ftconfig.h.in case, there is also FT_USE_AUTOCONF_SIZEOF_TYPES, whose utility currently escapes me
(i.e. FreeType's auto-detection of SIZEOF_INT and SIZEOF_LONG should be largely sufficient, at least for any C89 compiler).
I didn't want to touch that, but we should consider removing these entirely, unless there is a practical benefit to it
(since I suspect it is here for historical reasons). Any opinion on this? I'd be nice to get rid of this template as well.
 
Will check the rest of your code soon.

> Library size comparison for stripped libfreetype.so generated
> by all three build systems:
>
>   - Default build (autotools + libtool): 712 KiB
>   - CMake build (RelWithDebInfo):        712 KiB
>   - Meson build:                         784 KiB

Can this be improved for meson?

I think it's possible. I've been looking at it. The compiled objects are exactly the same, but the Meson build will link /usr/lib/x86_64-linux-gnu/libbz2.a /usr/lib/x86_64-linux-gnu/libbz2.so.1.0.4 (both of them), while the CMake build will only use the shared library version!
And my libbz2.a is about 80 KiB which fits the difference. Looks like we're statically linked libz2.a by mistake here. Let me try to fix it.


    Werner

reply via email to

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