Merge pull request 'Implement variadic functions for Win64 in the x86_64 backend' (#31672) from kcbanner/zig:win64_varargs into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31672
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
This commit is contained in:
Andrew Kelley
2026-04-12 01:34:16 +02:00
5 changed files with 229 additions and 45 deletions
+4
View File
@@ -986,11 +986,14 @@ pub const EmitArtifact = enum {
docs,
pdb,
h,
compiler_rt_dyn_lib,
/// If using `Server` to communicate with the compiler, it will place requested artifacts in
/// paths under the output directory, where those paths are named according to this function.
/// Returned string is allocated with `gpa` and owned by the caller.
pub fn cacheName(ea: EmitArtifact, gpa: Allocator, opts: BinNameOptions) Allocator.Error![]const u8 {
// hack for stage2_x86_64 + coff. See Coff.flush.
if (ea == .compiler_rt_dyn_lib) return "compiler_rt.dll";
const suffix: []const u8 = switch (ea) {
.bin => return binNameAlloc(gpa, opts),
.@"asm" => ".s",
@@ -1000,6 +1003,7 @@ pub const EmitArtifact = enum {
.docs => "-docs",
.pdb => ".pdb",
.h => ".h",
.compiler_rt_dyn_lib => unreachable,
};
return std.fmt.allocPrint(gpa, "{s}{s}", .{ opts.root_name, suffix });
}