build: add debug info builds to release process
This commit is contained in:
parent
8426ae61ba
commit
cb399a4c73
1 changed files with 42 additions and 4 deletions
46
build.zig
46
build.zig
|
@ -84,7 +84,7 @@ fn build_release(
|
||||||
lint_step: *std.Build.Step,
|
lint_step: *std.Build.Step,
|
||||||
tracy_enabled: bool,
|
tracy_enabled: bool,
|
||||||
use_tree_sitter: bool,
|
use_tree_sitter: bool,
|
||||||
strip: ?bool,
|
_: ?bool, //release builds control strip
|
||||||
use_llvm: ?bool,
|
use_llvm: ?bool,
|
||||||
pie: ?bool,
|
pie: ?bool,
|
||||||
_: bool, //gui
|
_: bool, //gui
|
||||||
|
@ -112,6 +112,7 @@ fn build_release(
|
||||||
const arch = triple.next() orelse unreachable;
|
const arch = triple.next() orelse unreachable;
|
||||||
const os = triple.next() orelse unreachable;
|
const os = triple.next() orelse unreachable;
|
||||||
const target_path = std.mem.join(b.allocator, "-", &[_][]const u8{ os, arch }) catch unreachable;
|
const target_path = std.mem.join(b.allocator, "-", &[_][]const u8{ os, arch }) catch unreachable;
|
||||||
|
const target_path_debug = std.mem.join(b.allocator, "-", &[_][]const u8{ os, arch, "debug" }) catch unreachable;
|
||||||
|
|
||||||
build_exe(
|
build_exe(
|
||||||
b,
|
b,
|
||||||
|
@ -124,14 +125,32 @@ fn build_release(
|
||||||
.{ .dest_dir = .{ .override = .{ .custom = target_path } } },
|
.{ .dest_dir = .{ .override = .{ .custom = target_path } } },
|
||||||
tracy_enabled,
|
tracy_enabled,
|
||||||
use_tree_sitter,
|
use_tree_sitter,
|
||||||
strip orelse true,
|
true,
|
||||||
use_llvm,
|
use_llvm,
|
||||||
pie,
|
pie,
|
||||||
false, //gui
|
false, //gui
|
||||||
version,
|
version,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (t.os_tag == .windows)
|
build_exe(
|
||||||
|
b,
|
||||||
|
run_step,
|
||||||
|
check_step,
|
||||||
|
test_step,
|
||||||
|
lint_step,
|
||||||
|
target,
|
||||||
|
optimize,
|
||||||
|
.{ .dest_dir = .{ .override = .{ .custom = target_path_debug } } },
|
||||||
|
tracy_enabled,
|
||||||
|
use_tree_sitter,
|
||||||
|
false,
|
||||||
|
use_llvm,
|
||||||
|
pie,
|
||||||
|
false, //gui
|
||||||
|
version,
|
||||||
|
);
|
||||||
|
|
||||||
|
if (t.os_tag == .windows) {
|
||||||
build_exe(
|
build_exe(
|
||||||
b,
|
b,
|
||||||
run_step,
|
run_step,
|
||||||
|
@ -143,12 +162,31 @@ fn build_release(
|
||||||
.{ .dest_dir = .{ .override = .{ .custom = target_path } } },
|
.{ .dest_dir = .{ .override = .{ .custom = target_path } } },
|
||||||
tracy_enabled,
|
tracy_enabled,
|
||||||
use_tree_sitter,
|
use_tree_sitter,
|
||||||
strip orelse true,
|
true,
|
||||||
use_llvm,
|
use_llvm,
|
||||||
pie,
|
pie,
|
||||||
true, //gui
|
true, //gui
|
||||||
version,
|
version,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
build_exe(
|
||||||
|
b,
|
||||||
|
run_step,
|
||||||
|
check_step,
|
||||||
|
test_step,
|
||||||
|
lint_step,
|
||||||
|
target,
|
||||||
|
optimize,
|
||||||
|
.{ .dest_dir = .{ .override = .{ .custom = target_path_debug } } },
|
||||||
|
tracy_enabled,
|
||||||
|
use_tree_sitter,
|
||||||
|
false,
|
||||||
|
use_llvm,
|
||||||
|
pie,
|
||||||
|
true, //gui
|
||||||
|
version,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue