Commit 62381011e0

Andrew Kelley <andrew@ziglang.org>
2024-04-30 01:57:40
apparently LLVM depends on ws2_32.dll now
1 parent c71943f
Changed files (2)
build.zig
@@ -334,6 +334,9 @@ pub fn build(b: *std.Build) !void {
         }
         if (target.result.os.tag == .windows) {
             inline for (.{ exe, check_case_exe }) |artifact| {
+                // LLVM depends on networking as of version 18.
+                artifact.linkSystemLibrary("ws2_32");
+
                 artifact.linkSystemLibrary("version");
                 artifact.linkSystemLibrary("uuid");
                 artifact.linkSystemLibrary("ole32");
CMakeLists.txt
@@ -866,9 +866,9 @@ target_include_directories(zig2 PUBLIC "${CMAKE_SOURCE_DIR}/stage1")
 target_link_libraries(zig2 LINK_PUBLIC zigcpp)
 
 if(MSVC)
-  target_link_libraries(zig2 LINK_PUBLIC ntdll.lib)
+  target_link_libraries(zig2 LINK_PUBLIC ntdll.lib ws2_32.lib)
 elseif(MINGW)
-  target_link_libraries(zig2 LINK_PUBLIC ntdll)
+  target_link_libraries(zig2 LINK_PUBLIC ntdll ws2_32)
 endif()
 
 if(NOT MSVC)