Closed Kobzol closed 2 years ago
BTW - if possible, try to propagate color formatting as well. I guess cargo disables color automatically when it detects its output is redirected, so it might involve passing an option to cargo to override this.
When I do a cargo build after a cargo pgo it causes a full dependency rebuild.
I'm not sure if my "config.toml" rustflags are being honoured?
I have them set as ["-C", "target-cpu=native", "-Z", "tune-cpu=native"]
I did a RUSTFLAGS="-C target-cpu=native -Z tune-cpu=native" cargo pgo optimize
and it did seem to produce a different binary, but still did a full dependency rebuild when running cargo build.
Will this change allow the verbose cargo output to be streamed as well? So I can see what flags are being set during the build.
Great tool by the way 👍
Rustflags from the config file should be honored, but cargo build
will always do a rebuild AFAIK, because cargo pgo
uses PGO flags (instrumentation/optimization) that will invalidate other builds. You would have to pass e.g. RUSTFLAGS="-Cprofile-generate"
to avoid a rebuild, but then you'd just use PGO again.. :)
Yes, with the streaming change, verbose output is also streamed and printed:
$ cargo pgo build -- --verbose
I published version 0.2.2
with cargo output streaming.
Currently,
cargo-pgo
runscargo
, gathers its output and then writes it to the output. However, it would be much nicer if we could instead stream the output ofcargo
interactively, so that the user can see it immediately and not just at the end.Use-case: https://github.com/Kobzol/cargo-pgo/issues/5#issuecomment-1265031077