Rust -o(pt-level) 3 and -target-cpu=x86_64_x? #110

Closed
opened 2022-05-10 21:53:36 +02:00 by RubenKelevra · 4 comments
Contributor

I was wondering if ALHP already sets the Rust-flags -opt-level=3 and -target-cpu=??

Not sure what values are supported on target-cpu except for generic and native as I just use native on my machines.

I was looking through the lto options as well, looks like there need to be these set?

"-C lto=fat -C codegen-units=1 -C linker-plugin-lto"

Probably most packages already set LTO to on (seen this in the Firefox MAKEPKG) so not sure if that's necessary at all.

I was wondering if ALHP already sets the Rust-flags `-opt-level=3` and `-target-cpu=?`? Not sure what values are supported on target-cpu except for generic and native as I just use native on my machines. I was looking through the lto options as well, looks like there need to be these set? "-C lto=fat -C codegen-units=1 -C linker-plugin-lto" Probably most packages already set LTO to on (seen this in the Firefox MAKEPKG) so not sure if that's necessary at all.
Owner

LTO is handled mostly by upstream now. Not sure about -target-cpu, but at least -opt-level seems to be set correctly with our current flag configuration.

LTO is handled mostly by upstream now. Not sure about `-target-cpu`, but at least `-opt-level` seems to be set correctly with our current flag configuration.
anonfunc added the
question
label 2022-05-11 20:51:12 +02:00
Author
Contributor

@anonfunc can you paste how the current makepkg.conf looks after patching?

@anonfunc can you paste how the current makepkg.conf looks after patching?
Author
Contributor

Looking at the source code I can't see where the correct -opt-level would come from.

Looking at the source code I can't see where the correct -opt-level would come from.
Author
Contributor

This should patch the rust flags (and ignore the opt-level if it's already on 3):

https://git.harting.dev/ALHP/ALHP.GO/pulls/120

Give it a thorough look, as I'm not that familiar with go (and your program) :)

This should patch the rust flags (and ignore the opt-level if it's already on 3): https://git.harting.dev/ALHP/ALHP.GO/pulls/120 Give it a thorough look, as I'm not that familiar with go (and your program) :)
Sign in to join this conversation.
No description provided.