firmware: globally enable LTO.

This used to crash with earlier rustc versions, but doesn't anymore,
and gives significant speedup (e.g. 2x on test_dma_record_time).
This commit is contained in:
whitequark 2018-08-12 19:11:48 +00:00
parent 2648b1b7a1
commit bdd18de2c1
2 changed files with 2 additions and 2 deletions

View File

@ -3,4 +3,5 @@ members = ["bootloader", "runtime", "ksupport", "satman"]
[profile.dev] [profile.dev]
incremental = false # incompatible with LTO incremental = false # incompatible with LTO
lto = true
debug = 2 debug = 2

View File

@ -7,8 +7,7 @@ all:: bootloader.bin
.PHONY: $(RUSTOUT)/libbootloader.a .PHONY: $(RUSTOUT)/libbootloader.a
$(RUSTOUT)/libbootloader.a: $(RUSTOUT)/libbootloader.a:
$(cargo) --manifest-path $(BOOTLOADER_DIRECTORY)/Cargo.toml -- \ $(cargo) --manifest-path $(BOOTLOADER_DIRECTORY)/Cargo.toml
-Clto
bootloader.elf: $(RUSTOUT)/libbootloader.a bootloader.elf: $(RUSTOUT)/libbootloader.a
$(link) -T $(BOOTLOADER_DIRECTORY)/bootloader.ld $(link) -T $(BOOTLOADER_DIRECTORY)/bootloader.ld