diff options
author | 2021-10-03 18:49:31 -0700 | |
---|---|---|
committer | 2021-10-03 18:49:31 -0700 | |
commit | 82bf89a946690c0297cba84bf50214eba705a863 (patch) | |
tree | 22215f2c7651fa07606221a57c35fbfe7b292d85 /build.zig | |
parent | f4a4e793aa964ba2d0883a19205c32ec01eaf8f0 (diff) | |
download | bun-jarred/linux.tar.gz bun-jarred/linux.tar.zst bun-jarred/linux.zip |
1% perf improvements on Linuxjarred/linux
Diffstat (limited to 'build.zig')
-rw-r--r-- | build.zig | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -280,7 +280,7 @@ pub fn build(b: *std.build.Builder) !void { var obj_step = b.step("obj", "Build Bun as a .o file"); var obj = b.addObject(bun_executable_name, exe.root_src.?.path); - obj.bundle_compiler_rt = true; + obj.setTarget(target); addPicoHTTP(obj, false); obj.addPackage(.{ .name = "clap", @@ -293,7 +293,15 @@ pub fn build(b: *std.build.Builder) !void { obj.linkLibC(); obj.linkLibCpp(); - obj.setTarget(target); + obj.bundle_compiler_rt = true; + + if (target.getOsTag() == .linux) { + // obj.want_lto = tar; + obj.link_emit_relocs = true; + obj.link_function_sections = true; + } + + } else { b.default_step.dependOn(&exe.step); } |