Fixes wrong output path of external project target in MSVC. It simplifies the conditional to use ".lib" suffix even if MINGW is not defied. (the not MINGW does not hit when MINGW is NOTFOUND) The behavior before this patch in MSVC was outputting ".a" for static libraries.
Diff Detail
Event Timeline
llvm/runtimes/CMakeLists.txt | ||
---|---|---|
66 |
llvm/runtimes/CMakeLists.txt | ||
---|---|---|
66 | Oh I was not correctly understanding the complexity here. I can drop this change in the mean time -- ORC is totally fine to use the new per-targrt directory even in MSVC. |
compiler-rt/cmake/base-config-ix.cmake | ||
---|---|---|
156 | I'm a bit surprised that this is even needed, according to CMake documentation, this should already be the default: https://cmake.org/cmake/help/v3.14/variable/CMAKE_STATIC_LIBRARY_SUFFIX.html |
compiler-rt/cmake/base-config-ix.cmake | ||
---|---|---|
156 | @phosek We're using clang-cl to build runtimes target by llvm_ExternalProject_Add. Cmake seems to be setting ".a" suffix when using clang to build MSVC target. This part is a workaround introduced by https://reviews.llvm.org/D24046 to fight this issue. |
This is actually not related to the conditionals but related to something in my system or cmake which causes it to set MINGW to true. Abandoning this patch as it is going to break clang-cl building case anyways.
This change on its own is probably ok.