varlink / libvarlink

C implementation of the Varlink protocol and command line tool
Apache License 2.0
87 stars 15 forks source link

meson: do not compile the library twice #2

Closed keszybz closed 6 years ago

keszybz commented 6 years ago

With autotools, the files comprising .a and .so libs were compiled just once to form .a, and .so was created by using -Wl,--whole-archive. Meson supports this too, with link_whole, but this options is only available since meson 0.40 and not very well advertised, and it either wasn't available yet or I just missed it when doing the initial conversion. Nevertheless, it works just fine, so let's use it. This makes the builds a bit faster (20 .c files are not compiled twice), but what more important, build warnings and errors are not printed twice.

The results are not byte-for-byte identical, but the file sizes and symbol tables are.