Fix Windows debugging

This commit is contained in:
David Gonzalez Martin 2024-04-15 16:33:48 -06:00
parent 23399c5ea6
commit a4a9241b09

View File

@ -23,7 +23,7 @@ pub fn build(b: *std.Build) !void {
const self_hosted_ci = b.option(bool, "self_hosted_ci", "This option enables the self-hosted CI behavior") orelse false; const self_hosted_ci = b.option(bool, "self_hosted_ci", "This option enables the self-hosted CI behavior") orelse false;
const third_party_ci = b.option(bool, "third_party_ci", "This option enables the third-party CI behavior") orelse false; const third_party_ci = b.option(bool, "third_party_ci", "This option enables the third-party CI behavior") orelse false;
const is_ci = self_hosted_ci or third_party_ci; const is_ci = self_hosted_ci or third_party_ci;
const print_stack_trace = b.option(bool, "print_stack_trace", "This option enables printing stack traces inside the compiler") orelse is_ci or os == .macos or os == .windows; const print_stack_trace = b.option(bool, "print_stack_trace", "This option enables printing stack traces inside the compiler") orelse is_ci or os == .macos;
const native_target = b.resolveTargetQuery(.{}); const native_target = b.resolveTargetQuery(.{});
const optimization = b.standardOptimizeOption(.{}); const optimization = b.standardOptimizeOption(.{});
const use_debug = b.option(bool, "use_debug", "This option enables the LLVM debug build in the development PC") orelse false; const use_debug = b.option(bool, "use_debug", "This option enables the LLVM debug build in the development PC") orelse false;
@ -113,7 +113,7 @@ pub fn build(b: *std.Build) !void {
compiler.root_module.addOptions("configuration", compiler_options); compiler.root_module.addOptions("configuration", compiler_options);
compiler.formatted_panics = print_stack_trace; compiler.formatted_panics = print_stack_trace;
compiler.root_module.unwind_tables = print_stack_trace; compiler.root_module.unwind_tables = print_stack_trace or target.result.os.tag == .windows;
compiler.root_module.omit_frame_pointer = false; compiler.root_module.omit_frame_pointer = false;
compiler.root_module.error_tracing = print_stack_trace; compiler.root_module.error_tracing = print_stack_trace;
compiler.want_lto = false; compiler.want_lto = false;
@ -496,7 +496,7 @@ pub fn build(b: *std.Build) !void {
.windows => blk: { .windows => blk: {
const result = b.addSystemCommand(&.{"remedybg"}); const result = b.addSystemCommand(&.{"remedybg"});
result.addArg("-g"); result.addArg("-g");
result.addArg(compiler_exe_path); // result.addArg(compiler_exe_path);
break :blk result; break :blk result;
}, },