diff options
author | 2022-02-16 04:03:35 -0800 | |
---|---|---|
committer | 2022-02-16 04:03:35 -0800 | |
commit | f8b48ebec63b395a6565bb01e65b1d284e176ec3 (patch) | |
tree | 5cec71568915fea0af6bad075f577e88350bd4e4 | |
parent | a7bfc48bcc775daf1556d6246a72e29fef2a06fe (diff) | |
download | bun-f8b48ebec63b395a6565bb01e65b1d284e176ec3.tar.gz bun-f8b48ebec63b395a6565bb01e65b1d284e176ec3.tar.zst bun-f8b48ebec63b395a6565bb01e65b1d284e176ec3.zip |
Save LLVM IR in debug build
-rw-r--r-- | build.zig | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |