diff --git a/.cargo/config b/.cargo/config index 7e83464..fc260d9 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,2 +1,5 @@ [build] -rustflags = ["-Cembed-bitcode=yes"] +rustflags = [ + # Kernel should preserve floating-point registers + "-Csoft-float", +] diff --git a/Cargo.toml b/Cargo.toml index b6bccec..8630f68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,3 +44,13 @@ qemu_debug = [] serial_debug = [] system76_ec_debug = [] slab = ["slab_allocator"] + +[profile.dev] +# Kernel doesn't yet work great with debug mode :( +opt-level = 3 + +# LTO fixes some duplicate symbols of memcpy/memmove/etc +lto = true + +[profile.release] +lto = true