Speed up compiles and clean up RUSTFLAGS #45
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before:
After:
We consolidate RUSTFLAGS so that they are entirely in
.cargo/config.toml
-- this speeds up compiles since we aren't modifyingRUSTFLAGS
as part ofcargo xtask *-build
(which triggers recompiles). This also means we only need to worry about the flags in.cargo/config.toml
.Putting all of the
RUSTFLAGS
in.cargo/config.toml
is mostly equivalent to passing them as an environment variable: there was a 100 byte difference in the application build, but it's not clear why.We also add a filesystem cache of the result of finding the
sysroot
. For some reason, repeated calculation of it can be expensive (adds multiple seconds to the build).Fixes #39