Skip to content
Snippets Groups Projects
Verified Commit f7a3f209 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Cleanup of rust configs

parent 733c1298
No related branches found
No related tags found
No related merge requests found
[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 ...@@ -5,6 +5,7 @@ all: $(BUILD)/bootloader.efi
$(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f) $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD) mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \ cargo rustc \
-Z build-std=core,alloc \ -Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \ -Z build-std-features=compiler-builtins-mem \
...@@ -12,11 +13,11 @@ $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f) ...@@ -12,11 +13,11 @@ $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--bin bootloader \ --bin bootloader \
--release \ --release \
-- \ -- \
-C soft-float \
--emit link=$@ --emit link=$@
$(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f) $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD) mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \ cargo rustc \
-Z build-std=core,alloc \ -Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \ -Z build-std-features=compiler-builtins-mem \
...@@ -25,7 +26,6 @@ $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f) ...@@ -25,7 +26,6 @@ $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--release \ --release \
--features live \ --features live \
-- \ -- \
-C soft-float \
--emit link=$@ --emit link=$@
$(BUILD)/esp.bin: $(BUILD)/bootloader.efi $(BUILD)/esp.bin: $(BUILD)/bootloader.efi
......
...@@ -7,7 +7,16 @@ all: $(BUILD)/bootloader.bin ...@@ -7,7 +7,16 @@ all: $(BUILD)/bootloader.bin
$(BUILD)/libbootloader.a: Cargo.lock Cargo.toml $(shell find src -type f) $(BUILD)/libbootloader.a: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD) 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 $(BUILD)/bootloader.elf: linkers/$(TARGET).ld $(BUILD)/libbootloader.a
mkdir -p $(BUILD) mkdir -p $(BUILD)
...@@ -21,7 +30,17 @@ $(BUILD)/bootloader.bin: $(BUILD)/bootloader.elf $(shell find asm/$(TARGET) -typ ...@@ -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) $(BUILD)/libbootloader-live.a: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD) 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 $(BUILD)/bootloader-live.elf: linkers/$(TARGET).ld $(BUILD)/libbootloader-live.a
mkdir -p $(BUILD) mkdir -p $(BUILD)
......
...@@ -5,6 +5,7 @@ all: $(BUILD)/bootloader.efi ...@@ -5,6 +5,7 @@ all: $(BUILD)/bootloader.efi
$(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f) $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD) mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \ cargo rustc \
-Z build-std=core,alloc \ -Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \ -Z build-std-features=compiler-builtins-mem \
...@@ -12,11 +13,11 @@ $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f) ...@@ -12,11 +13,11 @@ $(BUILD)/bootloader.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--bin bootloader \ --bin bootloader \
--release \ --release \
-- \ -- \
-C soft-float \
--emit link=$@ --emit link=$@
$(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f) $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
mkdir -p $(BUILD) mkdir -p $(BUILD)
env RUSTFLAGS="-C soft-float" \
cargo rustc \ cargo rustc \
-Z build-std=core,alloc \ -Z build-std=core,alloc \
-Z build-std-features=compiler-builtins-mem \ -Z build-std-features=compiler-builtins-mem \
...@@ -25,7 +26,6 @@ $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f) ...@@ -25,7 +26,6 @@ $(BUILD)/bootloader-live.efi: Cargo.lock Cargo.toml $(shell find src -type f)
--release \ --release \
--features live \ --features live \
-- \ -- \
-C soft-float \
--emit link=$@ --emit link=$@
$(BUILD)/esp.bin: $(BUILD)/bootloader.efi $(BUILD)/esp.bin: $(BUILD)/bootloader.efi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment