[PATCH] D56781: Use response file when generating LLVM-C.dll

Stella Stamenova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 16:43:59 PST 2019


stella.stamenova added a comment.

This change is causing build failures on Windows when using Visual Studio as the generator. It would also cause the same failure on for any other generator that supports multiple configurations.

The problem is that CMAKE_CFG_INTDIR changes value based on the tool (https://cmake.org/cmake/help/v3.13/variable/CMAKE_CFG_INTDIR.html) AND in the case of a generator that supports multiple configurations, it has a place-holder value (such as $(Configuration)) since the configuration is not known when CMake is invoked - the configuration is determined at build time.

You can look at other places in LLVM (or LLDB) where CMAKE_CFG_INTDIR is used to see a couple of ways that it can be handled. For example in llvm-lit:

  if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
    foreach(BUILD_MODE ${CMAKE_CONFIGURATION_TYPES})
      string(REPLACE ${CMAKE_CFG_INTDIR} ${BUILD_MODE} bi ${LIT_BASE_DIR})
      set(bi "${bi}/${LIT_FILE_NAME}")
      configure_file(
        llvm-lit.in
        ${bi}
        )
    endforeach()
  else()
    set(BUILD_MODE .)
    configure_file(
      llvm-lit.in
      ${LIT_BASE_DIR}/${LIT_FILE_NAME}
      )
  endif()

I can help test a fix when you have one - in the mean time, this change should probably be reverted since multiple people are seeing the issue.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56781





More information about the llvm-commits mailing list