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

@@ -452,7 +452,6 @@ pub fn build(b: *std.Build) !void {
.desc = "Run the behavior tests",
.optimize_modes = optimization_modes,
.include_paths = &.{},
.windows_libs = &.{},
.skip_single_threaded = skip_single_threaded,
.skip_non_native = skip_non_native,
.skip_freebsd = skip_freebsd,
@@ -475,7 +474,6 @@ pub fn build(b: *std.Build) !void {
.desc = "Run the @cImport tests",
.optimize_modes = optimization_modes,
.include_paths = &.{"test/c_import"},
.windows_libs = &.{},
.skip_single_threaded = true,
.skip_non_native = skip_non_native,
.skip_freebsd = skip_freebsd,
@@ -496,7 +494,6 @@ pub fn build(b: *std.Build) !void {
.desc = "Run the compiler_rt tests",
.optimize_modes = optimization_modes,
.include_paths = &.{},
.windows_libs = &.{},
.skip_single_threaded = true,
.skip_non_native = skip_non_native,
.skip_freebsd = skip_freebsd,
@@ -518,7 +515,6 @@ pub fn build(b: *std.Build) !void {
.desc = "Run the zigc tests",
.optimize_modes = optimization_modes,
.include_paths = &.{},
.windows_libs = &.{},
.skip_single_threaded = true,
.skip_non_native = skip_non_native,
.skip_freebsd = skip_freebsd,
@@ -540,12 +536,6 @@ pub fn build(b: *std.Build) !void {
.desc = "Run the standard library tests",
.optimize_modes = optimization_modes,
.include_paths = &.{},
.windows_libs = &.{
"advapi32",
"crypt32",
"iphlpapi",
"ws2_32",
},
.skip_single_threaded = skip_single_threaded,
.skip_non_native = skip_non_native,
.skip_freebsd = skip_freebsd,
@@ -743,12 +733,6 @@ fn addCompilerMod(b: *std.Build, options: AddCompilerModOptions) *std.Build.Modu
compiler_mod.addImport("aro", aro_mod);
compiler_mod.addImport("aro_translate_c", aro_translate_c_mod);
if (options.target.result.os.tag == .windows) {
compiler_mod.linkSystemLibrary("advapi32", .{});
compiler_mod.linkSystemLibrary("crypt32", .{});
compiler_mod.linkSystemLibrary("ws2_32", .{});
}
return compiler_mod;
}
@@ -1446,10 +1430,6 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath {
}),
});
if (b.graph.host.result.os.tag == .windows) {
doctest_exe.root_module.linkSystemLibrary("advapi32", .{});
}
var dir = b.build_root.handle.openDir("doc/langref", .{ .iterate = true }) catch |err| {
std.debug.panic("unable to open '{f}doc/langref' directory: {s}", .{
b.build_root, @errorName(err),