Verified Commit f7a3f209 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Cleanup of rust configs

parent 733c1298
[build]
rustflags = [
# Kernel should preserve floating-point registers
"-Csoft-float",
]
[unstable]
build-std = ["core", "alloc", "compiler_builtins"]
build-std-features = ["panic-unwind"]
......@@ -5,6 +5,7 @@ all: $(BUILD)/bootloader.efi
$(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \
-Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \
......@@ -12,11 +13,11 @@ $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--bin bootloader \
--release \
-- \
-C soft-float \
--emit link=$@
$(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \
-Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \
......@@ -25,7 +26,6 @@ $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--release \
--features live \
-- \
-C soft-float \
--emit link=$@
$(BUILD)/esp.bin: $(BUILD)/bootloader.efi
......
......@@ -7,7 +7,16 @@ all: $(BUILD)/bootloader.bin
$(BUILD)/libbootloader.a: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD)
cargo rustc --lib --target $(TARGET) --release -- -C soft-float -C debuginfo=2 --emit link=$@
env RUSTFLAGS="-C soft-float" \
cargo rustc \
-Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \
--target $(TARGET) \
--lib \
--release \
-- \
-C debuginfo=2 \
--emit link=$@
$(BUILD)/bootloader.elf: linkers/$(TARGET).ld $(BUILD)/libbootloader.a
mkdir -p $(BUILD)
......@@ -21,7 +30,17 @@ $(BUILD)/bootloader.bin: $(BUILD)/bootloader.elf $(shell find asm/$(TARGET) -typ
$(BUILD)/libbootloader-live.a: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD)
cargo rustc --lib --target $(TARGET) --release --features live -- -C soft-float -C debuginfo=2 --emit link=$@
env RUSTFLAGS="-C soft-float" \
cargo rustc \
-Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \
--target $(TARGET) \
--lib \
--release \
--features live \
-- \
-C debuginfo=2 \
--emit link=$@
$(BUILD)/bootloader-live.elf: linkers/$(TARGET).ld $(BUILD)/libbootloader-live.a
mkdir -p $(BUILD)
......
......@@ -5,6 +5,7 @@ all: $(BUILD)/bootloader.efi
$(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \
-Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \
......@@ -12,11 +13,11 @@ $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--bin bootloader \
--release \
-- \
-C soft-float \
--emit link=$@
$(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \
-Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \
......@@ -25,7 +26,6 @@ $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--release \
--features live \
-- \
-C soft-float \
--emit link=$@
$(BUILD)/esp.bin: $(BUILD)/bootloader.efi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment