Make building small again (in release mode)
This commit is contained in:
parent
75de049cbc
commit
b5eaaf9112
|
|
@ -200,8 +200,8 @@ pub fn build(b: *Builder) !void {
|
|||
|
||||
// Standard release options allow the person running `zig build` to select
|
||||
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall.
|
||||
// b.setPreferredReleaseMode(std.builtin.Mode.ReleaseSafe);
|
||||
const mode = b.standardReleaseOptions();
|
||||
// const mode = b.standardReleaseOptions();
|
||||
const mode = .ReleaseFast;
|
||||
|
||||
const files = try findFiles(ktarget);
|
||||
|
||||
|
|
@ -241,7 +241,9 @@ pub fn build(b: *Builder) !void {
|
|||
exe.code_model = std.builtin.CodeModel.kernel;
|
||||
exe.setLinkerScriptPath(getLinkerScript(ktarget));
|
||||
// exe.setOutputDir("bin");
|
||||
// exe.strip = true;
|
||||
if(mode != .Debug) {
|
||||
exe.strip = true;
|
||||
}
|
||||
// exe.single_threaded = true;
|
||||
|
||||
exe.install();
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ SECTIONS
|
|||
kernel_phys_offset = 0xffffffff80000000;
|
||||
. = kernel_phys_offset + 1M;
|
||||
|
||||
.stivale2hdr ALIGN(4K) :
|
||||
.stivale2hdr ALIGN(1K) :
|
||||
{
|
||||
KEEP(*(.stivale2hdr))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue