[PATCH] D133669: [compiler-rt] Fix wrong output path of external project target in MSVC.

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 17 14:12:54 PDT 2022


sunho added inline comments.


================
Comment at: compiler-rt/cmake/base-config-ix.cmake:156
 
-if(WIN32 AND NOT MINGW AND NOT CYGWIN)
+if(MSVC)
   set(CMAKE_SHARED_LIBRARY_PREFIX_C "")
----------------
phosek wrote:
> mstorsjo wrote:
> > This change on its own is probably ok.
> 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
@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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133669/new/

https://reviews.llvm.org/D133669



More information about the llvm-commits mailing list