From a8615cdbcfce5c37da54ebc5bcdc959e8e3f4af5 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 12 Aug 2018 19:11:48 +0000 Subject: [PATCH] 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). --- artiq/firmware/Cargo.toml | 1 + artiq/firmware/bootloader/Makefile | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/firmware/Cargo.toml b/artiq/firmware/Cargo.toml index 8ab755b00..1d2f871f3 100644 --- a/artiq/firmware/Cargo.toml +++ b/artiq/firmware/Cargo.toml @@ -3,4 +3,5 @@ members = ["bootloader", "runtime", "ksupport", "satman"] [profile.dev] incremental = false # incompatible with LTO +lto = true debug = 2 diff --git a/artiq/firmware/bootloader/Makefile b/artiq/firmware/bootloader/Makefile index f247c0994..ee70ff22f 100644 --- a/artiq/firmware/bootloader/Makefile +++ b/artiq/firmware/bootloader/Makefile @@ -7,8 +7,7 @@ all:: bootloader.bin .PHONY: $(RUSTOUT)/libbootloader.a $(RUSTOUT)/libbootloader.a: - $(cargo) --manifest-path $(BOOTLOADER_DIRECTORY)/Cargo.toml -- \ - -Clto + $(cargo) --manifest-path $(BOOTLOADER_DIRECTORY)/Cargo.toml bootloader.elf: $(RUSTOUT)/libbootloader.a $(link) -T $(BOOTLOADER_DIRECTORY)/bootloader.ld