diff options
author | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2021-11-07 23:52:11 +0100 |
---|---|---|
committer | Dario Nieuwenhuis <dirbaio@dirbaio.net> | 2021-11-07 23:52:11 +0100 |
commit | 2221e1fa935fef1fbc8a39a478824f0b163e6399 (patch) | |
tree | e411210300b63cf3bec2e32e2fb0f2d270129d84 /examples/stm32f7/.cargo | |
parent | 90095adedf370ddcda6d364dbb5e7f3a0a9b5895 (diff) | |
download | embassy-2221e1fa935fef1fbc8a39a478824f0b163e6399.zip |
Replace rustflags with build.rs extra-link-args.
Rustflags apply to ALL the crates in the graph, while we only need
them for the toplevel crate which is the only one getting linked.
Rustflags are not equal for all crates, this caused cargo to re-build the
same dependency crate multiple times uselessly. After this change, deps
are reused more, making builds faster.
Note that this only applies when sharing the target/ dir for multiple crates
in the repo which is not the default.
Diffstat (limited to 'examples/stm32f7/.cargo')
-rw-r--r-- | examples/stm32f7/.cargo/config.toml | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/examples/stm32f7/.cargo/config.toml b/examples/stm32f7/.cargo/config.toml index 632e8154..f490ed8e 100644 --- a/examples/stm32f7/.cargo/config.toml +++ b/examples/stm32f7/.cargo/config.toml @@ -2,17 +2,5 @@ # replace STM32F429ZITx with your chip as listed in `probe-run --list-chips` runner = "probe-run --chip STM32F767ZITx" -rustflags = [ - # LLD (shipped with the Rust toolchain) is used as the default linker - "-C", "link-arg=--nmagic", - "-C", "link-arg=-Tlink.x", - "-C", "link-arg=-Tdefmt.x", - - # Code-size optimizations. - "-Z", "trap-unreachable=no", - "-C", "inline-threshold=5", - "-C", "no-vectorize-loops", -] - [build] target = "thumbv7em-none-eabihf" |