Revert "Sema: Stop adding Windows implib link inputs for extern "..." syntax."

This reverts commit b461d07a54.

After some discussion in the team, we've decided that this is too disruptive,
especially because the linker errors are less than helpful. That's a fixable
problem, so we might reconsider this in the future, but revert it for now.
This commit is contained in:
Alex Rønne Petersen
2025-08-05 22:32:35 +02:00
parent 9a158c1dae
commit 7ee6dab39f
10 changed files with 46 additions and 78 deletions

View File

@@ -50,10 +50,6 @@ 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);
@@ -70,10 +66,6 @@ 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);
}

View File

@@ -47,8 +47,6 @@ 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");

View File

@@ -28,8 +28,6 @@ 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);
@@ -46,8 +44,6 @@ 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");

View File

@@ -28,8 +28,6 @@ pub fn build(b: *std.Build) void {
}),
});
main.root_module.linkSystemLibrary("advapi32", .{});
const run = b.addRunArtifact(main);
run.addArtifactArg(hello);
run.expectExitCode(0);