From 62381011e0dd692ec6bb30d14e0d5e2f6ec4d5d5 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 29 Apr 2024 16:57:40 -0700 Subject: [PATCH] apparently LLVM depends on ws2_32.dll now --- CMakeLists.txt | 4 ++-- build.zig | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f1adef3787..6796165f06 100644 --- a/CMakeLists.txt +++ b/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) diff --git a/build.zig b/build.zig index 78492aa773..e2d488057b 100644 --- a/build.zig +++ b/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");