From 7ee6dab39fac7aa12fa9fd952bb2bdc28d5eabe8 Mon Sep 17 00:00:00 2001 From: Alex Rønne Petersen Date: Tue, 5 Aug 2025 22:32:35 +0200 Subject: Revert "Sema: Stop adding Windows implib link inputs for `extern "..."` syntax." This reverts commit b461d07a5464aec86c533434dab0b58edfffb331. 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. --- build.zig | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 95c97f29b6..ace08e740b 100644 --- a/build.zig +++ b/build.zig @@ -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), -- cgit v1.2.3