diff --git a/test/link/macho/tbdv3/build.zig b/test/link/macho/tbdv3/build.zig index c2eb6df626cc..2c21deb89b2d 100644 --- a/test/link/macho/tbdv3/build.zig +++ b/test/link/macho/tbdv3/build.zig @@ -23,8 +23,9 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize .optimize = optimize, .target = target, }); - lib.addCSourceFile("a.c", &.{}); + lib.addCSourceFile(.{ .file = .{ .path = "a.c" }, .flags = &.{} }); lib.linkLibC(); + lib.forceEmit(.bin); // will be referenced by the tbd file const tbd_file = b.addWriteFile("liba.tbd", \\--- !tapi-tbd-v3 @@ -43,7 +44,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize .optimize = optimize, .target = target, }); - exe.addCSourceFile("main.c", &[0][]const u8{}); + exe.addCSourceFile(.{ .file = .{ .path = "main.c" }, .flags = &[0][]const u8{} }); exe.linkSystemLibrary("a"); exe.addLibraryPathDirectorySource(tbd_file.getDirectorySource()); exe.addRPathDirectorySource(lib.getOutputDirectorySource()); diff --git a/test/standalone/coff_dwarf/build.zig b/test/standalone/coff_dwarf/build.zig index d4a2f2b65bf0..b85b44b686cb 100644 --- a/test/standalone/coff_dwarf/build.zig +++ b/test/standalone/coff_dwarf/build.zig @@ -23,7 +23,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, .target = target, }); - lib.addCSourceFile(.{ .file = "shared_lib.c", .flags = &.{"-gdwarf"} }); + lib.addCSourceFile(.{ .file = .{ .path = "shared_lib.c" }, .flags = &.{"-gdwarf"} }); lib.linkLibC(); exe.linkLibrary(lib);