plan9: change output executable name

Now object files have the `name.<target char>`
Executables are just `name`
Libs are `name.a`
This commit is contained in:
Jacob G-W 2021-09-02 15:51:49 -04:00 committed by Andrew Kelley
parent c2f585e435
commit 88e0f81eef

View File

@ -176,9 +176,11 @@ pub fn binNameAlloc(allocator: *std.mem.Allocator, options: BinNameOptions) erro
.spirv => return std.fmt.allocPrint(allocator, "{s}.spv", .{root_name}),
.hex => return std.fmt.allocPrint(allocator, "{s}.ihex", .{root_name}),
.raw => return std.fmt.allocPrint(allocator, "{s}.bin", .{root_name}),
.plan9 => return std.fmt.allocPrint(allocator, "{s}{s}", .{
root_name, ofmt.fileExt(target.cpu.arch),
}),
.plan9 => switch (options.output_mode) {
.Exe => return allocator.dupe(u8, root_name),
.Obj => return std.fmt.allocPrint(allocator, "{s}{s}", .{ root_name, ofmt.fileExt(target.cpu.arch) }),
.Lib => return std.fmt.allocPrint(allocator, "{s}{s}.a", .{ target.libPrefix(), root_name }),
},
}
}