Skip to content
This repository was archived by the owner on May 27, 2020. It is now read-only.

Commit c108367

Browse files
committed
Clean up build options
1 parent 5c72fc1 commit c108367

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ path = "efi"
1212
[lib]
1313
name = "akira"
1414
crate-type = ["staticlib"]
15+
16+
[profile.release]
17+
panic = "abort"
18+
lto = true

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ cargo = \
1616

1717
# Runs `cargo rustc` with the specified options
1818
# $1: Options passed to Cargo
19-
# $2: Options passed to rustc
20-
cargo_rustc = $(call cargo,rustc,$1 -- -C panic=abort -C no-stack-check $2)
19+
cargo_rustc = $(call cargo,rustc,$1 -- -C panic=abort -C no-stack-check)
2120

2221
# Recursive wildcard function
2322
# http://blog.jgc.org/2011/07/gnu-make-recursive-wildcard-function.html
@@ -44,11 +43,11 @@ ALL_AKIRA_DEPS := $(LIBCORE_RLIB) \
4443

4544
# Step 1: Build the custom `libcore`
4645
$(LIBCORE_RLIB): $(call find_rust_files,core/)
47-
cd core && $(call cargo_rustc,--features disable_float,)
46+
cd core && $(call cargo_rustc,--features disable_float)
4847

4948
# Step 2: Compile the EFI stub
5049
$(LIBAKIRA_A): $(ALL_AKIRA_DEPS)
51-
$(call cargo_rustc,,-C lto)
50+
$(call cargo_rustc,)
5251

5352
# Step 3: Link the result into an EFI executable
5453
$(BOOTX64_EFI): $(LIBAKIRA_A)

0 commit comments

Comments
 (0)