kernel: strip debug info in non-Debug builds
ReleaseSafe kept full DWARF/symtab because nothing set strip on the kernel module, bloating the flashable image to 2.4MB (~1.4MB of which was debug info). Strip for every optimize mode except Debug, so release builds shrink to ~900KB while debug builds keep symbols.
This commit is contained in:
@@ -191,6 +191,7 @@ fn addKernel(
|
||||
.sanitize_c = .off, // the UBSan runtime needs f128/SSE support we don't provide
|
||||
.stack_check = false, // stack-probe calls have no runtime to land in
|
||||
.stack_protector = false,
|
||||
.strip = optimize != .Debug, // DWARF info doubles the flashable image; keep it only for debug builds
|
||||
.imports = &.{
|
||||
.{ .name = "boot-handoff", .module = modules.boot_handoff },
|
||||
.{ .name = "abi", .module = modules.abi },
|
||||
|
||||
Reference in New Issue
Block a user