Skip to content

Commit cc7a18c

Browse files
authored
Set Support system_libs if WIN32, not just MSVC or MINGW (llvm#95505)
The previous check was false when compiling with `clang++`, which prevented `ntdll` from being specified as a link library, causing an undefined symbol error when trying to resolve `RtlGetLastNtStatus`. Since we always want to link these libraries on Windows, the check can be simplified to just `if( WIN32 )`.
1 parent 005758e commit cc7a18c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Support/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if(LLVM_ENABLE_ZSTD)
3737
list(APPEND imported_libs ${zstd_target})
3838
endif()
3939

40-
if( MSVC OR MINGW )
40+
if( WIN32 )
4141
# libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
4242
# advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
4343
# ntdll required for RtlGetLastNtStatus in lib/Support/ErrorHandling.cpp.
@@ -72,7 +72,7 @@ elseif( CMAKE_HOST_UNIX )
7272
add_compile_definitions(_BSD_SOURCE)
7373
set(system_libs ${system_libs} bsd network)
7474
endif()
75-
endif( MSVC OR MINGW )
75+
endif( WIN32 )
7676

7777
# Delay load shell32.dll if possible to speed up process startup.
7878
set (delayload_flags)

0 commit comments

Comments
 (0)