Save LLVM IR in debug build

This commit is contained in:
Jarred Sumner
2022-02-16 04:03:35 -08:00
parent a7bfc48bcc
commit f8b48ebec6

View File

@@ -278,6 +278,10 @@ pub fn build(b: *std.build.Builder) !void {
obj.setBuildMode(mode);
obj.linkLibC();
obj.linkLibCpp();
if (mode == std.builtin.Mode.Debug)
obj.emit_llvm_ir = .{
.emit_to = try std.fmt.allocPrint(b.allocator, "{s}/{s}.ll", .{ output_dir, bun_executable_name }),
};
obj.strip = false;
obj.bundle_compiler_rt = true;