Kobzol / cargo-pgo

Cargo subcommand for optimizing Rust binaries/libraries with PGO and BOLT.
MIT License
573 stars 11 forks source link

Overwriting profile is not possible #37

Closed kleinesfilmroellchen closed 9 months ago

kleinesfilmroellchen commented 1 year ago

While I can use --profile=xyz to pass a different profile to Cargo, this conflicts with the --release option that cargo-pgo always supplies. In my case, since other tools like wasm-pack are also inflexible in terms of Cargo profiles, I cannot use --release and have (multiple) separate release profiles for different purposes.

Therefore, it would be nice to have a profile option on cargo-pgo directly, which will override the --release argument for Cargo. The default doesn't have to be changed.

Kobzol commented 1 year ago

Hi! Good point, that was an oversight on my part. Can you please check if this branch solves your issue?

$ cargo install --git https://github.com/kobzol/cargo-pgo --branch examine-profile
hatoo commented 9 months ago

@Kobzol It works in my environment. Could you release this feature?

Kobzol commented 9 months ago

https://github.com/Kobzol/cargo-pgo/pull/45 should fix this, I will publish a new release shortly.

Kobzol commented 9 months ago

Published v0.2.6 with the fix (and a few other fixes).