Closed tesuji closed 4 years ago
Does cargo install
respect this part of the manifest?
Test locally with cargo -Ztimings install --path .
, it seems so.
I updated the gist link with new result of cargo install
.
You might want to consider using this instead of listing explicit packages.
[profile.release.build-override]
opt-level = 0
Also beware, this sets the msrv to 1.41.
this sets the msrv to 1.41.
@sfackler set CI to nightly. So this shouldn't be problem?
Does build-override
make crates have build.rs
(for example FFI crates) no optimization even in release build?
I cannot tell when looking at https://doc.rust-lang.org/nightly/cargo/reference/profiles.html#overrides
Does
build-override
make build.rs (which FFI crates often be) no optimization even in release build?
I'm not sure I understand the question. The build script and all of its dependencies will be built with opt-level=0. Running the build script will still set the OPT_LEVEL
environment variable to 2, build-override
does not affect that.
Sorry for confusing. I was asking that does build-override
make FFI crates, which often have build.rs
,
non opimized in release build?
Ah, no. The crate itself is unaffected and will use opt-level=2. Cargo doesn't know if something is an ffi crate or not. build-override
only affects compilation of the build.rs script itself (and proc macros).
Thanks for explanation. I was misunderstanding that.
Neat, thanks!
According to measurement on my machine, compilation time go from 45.8s to 25.4s. More infomation in cargo-timing file: https://gist.github.com/lzutao/4b1a3709d150a6c746fb9b93dcd80076