-
Notifications
You must be signed in to change notification settings - Fork 40
Programm size leaps #44
Comments
Can you run |
This is ThinLTO doing a poor job optimizing the program. Compiling |
The worst offender is the usual formatting stuff. |
@japaric Not even sure how to control ThinLTO, whether I explicitly enable or disable it, I'll always get:
|
$ cat .cargo/config
[target.thumbv7m-none-eabi]
runner = 'arm-none-eabi-gdb'
rustflags = [
"-C", "link-arg=-Tlink.x",
"-C", "linker=arm-none-eabi-ld",
"-Z", "linker-flavor=ld",
"-Z", "thinlto=no", # <-
]
[build]
target = "thumbv7m-none-eabi" |
@burrbull is correct, the read() somehow drags in the whole formatting crap. |
😲 With thin_lto=no:
|
@japaric
Looks as if there're a potential panic somewhere which rustc cannot determine will not happen with ThinLTO enabled. |
Workaround landed in #45. The root of the problem (ThinLTO) has to be fixed upstream. |
2018-01-26
Mint 18.3
rustc 1.25.0-nightly (5965b7901 2018-01-19)
In serial example one string:
let received = block!(rx.read()).unwrap();
adds +9614 bytes
The text was updated successfully, but these errors were encountered: