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 27, 2023
1 parent d7aeadb commit 643ec8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 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,10 +44,10 @@ 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());
exe.addLibraryPath(tbd_file.getDirectory());
exe.addRPath(lib.getEmitDirectory());
exe.linkLibC();

const run = b.addRunArtifact(exe);
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 643ec8c

Please sign in to comment.