diff --git a/clang/tools/libclang/CMakeLists.txt b/clang/tools/libclang/CMakeLists.txt --- a/clang/tools/libclang/CMakeLists.txt +++ b/clang/tools/libclang/CMakeLists.txt @@ -101,7 +101,7 @@ unset(ENABLE_STATIC) endif() -if(WIN32) +if(MSVC) set(output_name "libclang") else() set(output_name "clang") @@ -205,4 +205,3 @@ COMPONENT libclang-python-bindings) endif() - diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt --- a/lldb/source/API/CMakeLists.txt +++ b/lldb/source/API/CMakeLists.txt @@ -182,10 +182,10 @@ set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc") endif() -if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) +if (MSVC) # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs, # so only it needs to explicitly link against ${Python3_LIBRARIES} - if (MSVC AND LLDB_ENABLE_PYTHON) + if (LLDB_ENABLE_PYTHON) target_link_libraries(liblldb PRIVATE ${Python3_LIBRARIES}) endif() else() diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -567,7 +567,7 @@ endif() if(ARG_SHARED) - if(WIN32) + if(MSVC) set_target_properties(${name} PROPERTIES PREFIX "" )