[PATCH] D24046: [compiler-rt] Fix library suffixes on windows

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 13:57:00 PDT 2016


fjricci added a comment.

The problem comes when we use clang and not MSVC, and the gcc driver in clang is used, which adds the `.a` suffix instead of the `.lib` suffix by default.

(cmake:Modules/Platform/Windows-Clang.cmake)

  if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
      OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
    include(Platform/Windows-MSVC)
    macro(__windows_compiler_clang lang)
      __windows_compiler_msvc(${lang})
    endmacro()
  else()
    include(Platform/Windows-GNU)
    macro(__windows_compiler_clang lang)
      __windows_compiler_gnu(${lang})
    endmacro()
  endif()

I'll update the patch to check for `CMAKE_SYSTEM_NAME=Windows` instead of `WIN32` to avoid breaking MinGW and Cygwin.


https://reviews.llvm.org/D24046





More information about the llvm-commits mailing list