Skip to content

Commit

Permalink
Rebase + two fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix "xq" Queißner committed Jul 26, 2023
1 parent d7aeadb commit a21f99d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test/link/macho/tbdv3/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion test/standalone/coff_dwarf/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a21f99d

Please sign in to comment.