[PATCH] D109977: LLVM Driver Multicall tool

Alex Brachet via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 19 14:45:34 PDT 2022


abrachet added a comment.

In D109977#3662859 <https://reviews.llvm.org/D109977#3662859>, @mgorny wrote:

> The actual problem is that you're passing `${USE_SHARED}` to `llvm_config()` (in `add_llvm_executable`) before it's defined. Moving the definition earlier fixed this error but uncovers another problem:

Thanks for looking into it more. As for what @maskray said this mode won't work with `LLVM_TOOL_LLVM_DRIVER_BUILD=On` and it looks like because we were using this variable before setting, it was always empty anyway. For the reproducer that you gave the following diff works. Do you want to try this diff with the full gentoo build that was breaking? If it works then we can commit this.

  diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
  index 8e1385e90b82..5563a7848ec3 100644
  --- a/llvm/cmake/modules/AddLLVM.cmake
  +++ b/llvm/cmake/modules/AddLLVM.cmake
  @@ -909,7 +909,7 @@ macro(add_llvm_executable name)
       
       set_property(GLOBAL APPEND PROPERTY LLVM_DRIVER_TOOLS ${name})
       target_link_libraries(${obj_name} ${LLVM_PTHREAD_LIB})
  -    llvm_config(${obj_name} ${USE_SHARED} ${LLVM_LINK_COMPONENTS} )
  +    llvm_config(${obj_name} ${LLVM_LINK_COMPONENTS})
     endif()
   
     add_windows_version_resource_file(ALL_FILES ${ALL_FILES})




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109977



More information about the cfe-commits mailing list