aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-08-05 22:32:35 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-08-06 06:15:13 +0200
commit7ee6dab39fac7aa12fa9fd952bb2bdc28d5eabe8 (patch)
treeb97957e62077e78f6bf49836babcdb84b4ff772f /build.zig
parent9a158c1dae531f2a4e5667569bed38c27cbd4d57 (diff)
downloadzig-7ee6dab39fac7aa12fa9fd952bb2bdc28d5eabe8.tar.gz
zig-7ee6dab39fac7aa12fa9fd952bb2bdc28d5eabe8.zip
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.
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig20
1 files changed, 0 insertions, 20 deletions
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),