Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rust based packages: user defined lto worked 4 the 1st time.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Apr 23, 2024 6:15 pm    Post subject: rust based packages: user defined lto worked 4 the 1st time. Reply with quote

Just succerded tto-fat user defined built.
-10.92% binray shrink :lol: gui-apps/eww::guru

Build has big ram use though low on ressources here.
Motre tests required before publishing on how 2.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Thu May 02, 2024 7:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Apr 23, 2024 7:52 pm    Post subject: Reply with quote

Another one with -11.04 :lol: media-sound/helvum

Thks 4 ur attention, interest & support
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Tue Apr 23, 2024 9:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Apr 23, 2024 8:12 pm    Post subject: Reply with quote

Ouch +0.11 this time, building still :cry: app-shells/mcfly

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Tue Apr 23, 2024 9:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Apr 23, 2024 9:31 pm    Post subject: Reply with quote

Okay,
It's all about adding the following to RUSTFLAGS:
Code:
-Clto=fat
-Cembed-bitcode=yes

packages referencing proc-macro* crates also require
Code:
-Zdylib-lto
here.
rust compiler required it when needed.

Achieved with
Code:
dev-lang/rust
     Installed versions:  1.77.1(stable/1.77)^t(08:53:51 15/04/2024)(clippy doc miri nightly profiler rust-analyzer rust-src rustfmt system-bootstrap verify-sig wasm -big-endian -debug -dist -llvm-libunwind -lto -parallel-compiler -system-llvm -test ABI_MIPS="-n32 -n64 -o32" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" CPU_FLAGS_X86="sse2" LLVM_TARGETS="WebAssembly X86 -AArch64 -AMDGPU -ARC -ARM -AVR -BPF -CSKY -DirectX -Hexagon -Lanai -LoongArch -M68k -MSP430 -Mips -NVPTX -PowerPC -RISCV -SPIRV -Sparc -SystemZ -VE -XCore -Xtensa")


Plz note some packages already have lto directive; some will have their size increased when adding as described above (e.g. sys-apps/fd)

Thks 4 ur attention, interest & support
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Thu May 02, 2024 5:14 pm    Post subject: Reply with quote

gui-wm/niri::guru gains 14.27% here.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum