[PATCH] D87517: [MinGW] Use lib prefix for libraries
Mateusz MikuĊa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 07:57:06 PDT 2020
mati865 created this revision.
mati865 added a reviewer: LLVM.
mati865 added projects: LLVM, clang, LLDB.
Herald added subscribers: llvm-commits, lldb-commits, cfe-commits, JDevlieghere, mgorny.
mati865 requested review of this revision.
In MinGW world, UNIX like `lib` prefix is preferred. This patch adjusts CMake files to do that.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87517
Files:
clang/tools/libclang/CMakeLists.txt
lldb/source/API/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -567,7 +567,7 @@
endif()
if(ARG_SHARED)
- if(WIN32)
+ if(MSVC)
set_target_properties(${name} PROPERTIES
PREFIX ""
)
Index: lldb/source/API/CMakeLists.txt
===================================================================
--- lldb/source/API/CMakeLists.txt
+++ 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()
Index: clang/tools/libclang/CMakeLists.txt
===================================================================
--- clang/tools/libclang/CMakeLists.txt
+++ 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()
-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87517.291219.patch
Type: text/x-patch
Size: 1434 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/a64b9260/attachment.bin>
More information about the llvm-commits
mailing list