mesonbuild/meson

Libraries built with lto and meson/ninja are larger than with configure/make

オープン

#3,059 opened on 2018/02/13

 (17 件のコメント) (0 件のリアクション) (0 人の担当者)Python (1,465 件のフォーク)batch import
compilersgood first issuehelp wanted

Repository metrics

Stars
 (4,978 個のスター)
PR merge metrics
 (平均マージ 139d 13h) (30d で 51 merged PRs)

説明

Using meson-0.43.0, ninja-1.8.2, gcc-7.2.0

Building glib-2.54.3 with lto as per below results in the following library sizes for libgio-2.0.so.0.5400.3 (stripped)

1,419,000 bytes with configure/make 1,525,688 bytes with meson/ninja

i.e. about 100kb or 10% larger with meson/ninja

from "ninja -v", it appears that lto is being used at link time, but maybe this isn't the case?

CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" meson --prefix=/usr/local --buildtype=plain -Dwith-pcre=system -Dwith-docs=no -Denable-libmount=no ..

ninja [fails at link ninja: build stopped: subcommand failed unless locale set to UTF8] [1m 17.80s]
sudo ninja install
CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --localstatedir=/var --disable-static --with-pcre=system --disable-libmount

find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \;

make [1m 31.96s]
sudo make install

コントリビューターガイド