Sema: Stop adding Windows implib link inputs for extern "..." syntax.
Closes #23971.
This commit is contained in:
@@ -50,6 +50,10 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
if (case.link_libc) exe.root_module.link_libc = true;
|
||||
|
||||
if (resolved_target.result.os.tag == .windows) {
|
||||
exe.root_module.linkSystemLibrary("advapi32", .{});
|
||||
}
|
||||
|
||||
_ = exe.getEmittedBin();
|
||||
|
||||
step.dependOn(&exe.step);
|
||||
@@ -66,6 +70,10 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
if (case.link_libc) exe.root_module.link_libc = true;
|
||||
|
||||
if (resolved_target.result.os.tag == .windows) {
|
||||
exe.root_module.linkSystemLibrary("advapi32", .{});
|
||||
}
|
||||
|
||||
const run = b.addRunArtifact(exe);
|
||||
step.dependOn(&run.step);
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ pub fn build(b: *std.Build) !void {
|
||||
}),
|
||||
});
|
||||
|
||||
fuzz.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const fuzz_max_iterations = b.option(u64, "iterations", "The max fuzz iterations (default: 100)") orelse 100;
|
||||
const fuzz_iterations_arg = std.fmt.allocPrint(b.allocator, "{}", .{fuzz_max_iterations}) catch @panic("oom");
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ pub fn build(b: *std.Build) !void {
|
||||
}),
|
||||
});
|
||||
|
||||
test_exe.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const run = b.addRunArtifact(test_exe);
|
||||
run.addArtifactArg(echo_args);
|
||||
run.expectExitCode(0);
|
||||
@@ -44,6 +46,8 @@ pub fn build(b: *std.Build) !void {
|
||||
}),
|
||||
});
|
||||
|
||||
fuzz.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const fuzz_max_iterations = b.option(u64, "iterations", "The max fuzz iterations (default: 100)") orelse 100;
|
||||
const fuzz_iterations_arg = std.fmt.allocPrint(b.allocator, "{}", .{fuzz_max_iterations}) catch @panic("oom");
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ pub fn build(b: *std.Build) void {
|
||||
}),
|
||||
});
|
||||
|
||||
main.root_module.linkSystemLibrary("advapi32", .{});
|
||||
|
||||
const run = b.addRunArtifact(main);
|
||||
run.addArtifactArg(hello);
|
||||
run.expectExitCode(0);
|
||||
|
||||
Reference in New Issue
Block a user