mirror of
https://github.com/ziglang/zig.git
synced 2025-12-08 23:33:07 +00:00
example usage:
if (!strip) {
b.installArtifact(exe);
} else {
const stripped_exe = b.addObjCopy(exe.getEmittedBin(), .{
.basename = exe.out_filename, // set the name for the debuglink
.compress_debug = true,
.strip = .debug_and_symbols,
.extract_to_separate_file = true,
});
b.getInstallStep().dependOn(&b.addInstallBinFile(stripped_exe.getOutput(), exe.out_filename).step);
b.getInstallStep().dependOn(&b.addInstallBinFile(stripped_exe.getOutputSeparatedDebug().?, b.fmt("{s}.debug", .{exe.out_filename})).step);
}