Skip to content

Commit

Permalink
Update build.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jul 16, 2024
1 parent 005c912 commit 7c2ab49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ pub inline fn addMultiCheck(
}

pub fn addBunObject(b: *Build, opts: *BunBuildOptions) *Compile {
const disable_pie = opts.os == .linux;
const obj = b.addObject(.{
.name = if (opts.optimize == .Debug) "bun-debug" else "bun",
.root_source_file = switch (opts.os) {
Expand All @@ -338,10 +339,10 @@ pub fn addBunObject(b: *Build, opts: *BunBuildOptions) *Compile {
},
.target = opts.target,
.optimize = opts.optimize,
.pic = false,
.pic = !disable_pie,
.strip = false, // stripped at the end
});

obj.pie = !disable_pie;
obj.bundle_compiler_rt = false;
obj.formatted_panics = true;
obj.root_module.omit_frame_pointer = false;
Expand Down

0 comments on commit 7c2ab49

Please sign in to comment.