From 513c2151cd0cddd90af91a6614b15b74b538963e Mon Sep 17 00:00:00 2001 From: David Spickett Date: Thu, 21 Dec 2023 13:10:33 +0000 Subject: [PATCH] [lldb][test] Only link Windows libraries on Windows ld.lld: error: unable to find library -llldbPluginProcessWindowsCommon https://lab.llvm.org/buildbot/#/builders/96/builds/50407 Fixes 95e5839e06fdffd278499257c6e7679bba3d6868. --- lldb/unittests/Thread/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lldb/unittests/Thread/CMakeLists.txt b/lldb/unittests/Thread/CMakeLists.txt index f6c8795f349a5e5..a90643eb0c110e7 100644 --- a/lldb/unittests/Thread/CMakeLists.txt +++ b/lldb/unittests/Thread/CMakeLists.txt @@ -1,3 +1,8 @@ +if (CMAKE_SYSTEM_NAME MATCHES "Windows") + list(APPEND LLDB_WINDOWS_LIBS lldbPluginProcessWindows) + list(APPEND LLDB_WINDOWS_LIBS lldbPluginProcessWindowsCommon) +endif() + add_lldb_unittest(ThreadTests ThreadTest.cpp @@ -11,7 +16,6 @@ add_lldb_unittest(ThreadTests lldbInterpreter lldbBreakpoint lldbPluginPlatformLinux - lldbPluginPlatformWindows - lldbPluginProcessWindowsCommon + ${LLDB_WINDOWS_LIBS} )