[PATCH] D90848: llvmbuildectomy - part 2

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 03:16:57 PST 2020


serge-sans-paille added inline comments.


================
Comment at: llvm/cmake/modules/LLVM-Build.cmake:85
+  get_property(llvm_components GLOBAL PROPERTY LLVM_COMPONENT_LIBS)
+  get_property(llvm_has_jit_native TARGET ${LLVM_NATIVE_ARCH} PROPERTY LLVM_HAS_JIT)
+  if(llvm_has_jit_native)
----------------
bjope wrote:
> Had some build failures downstream after bringing in this patch.
> 
> I kind of needed this (not sure it is exactly what you wanna do):
> 
> ```
> diff --git a/llvm/cmake/modules/LLVM-Build.cmake b/llvm/cmake/modules/LLVM-Build.cmake
> index 746f09b09019..21818587766a 100644
> --- a/llvm/cmake/modules/LLVM-Build.cmake
> +++ b/llvm/cmake/modules/LLVM-Build.cmake
> @@ -82,7 +82,9 @@ endfunction()
>  # Resolve cross-component dependencies, for each available component.
>  function(LLVMBuildResolveComponentsLink)
>    get_property(llvm_components GLOBAL PROPERTY LLVM_COMPONENT_LIBS)
> -  get_property(llvm_has_jit_native TARGET ${LLVM_NATIVE_ARCH} PROPERTY LLVM_HAS_JIT)
> +  if(have_native_backend)
> +    get_property(llvm_has_jit_native TARGET ${LLVM_NATIVE_ARCH} PROPERTY LLVM_HAS_JIT)
> +  endif()
>    if(llvm_has_jit_native)
>      set_property(TARGET Engine APPEND PROPERTY LLVM_LINK_COMPONENTS "MCJIT" "Native")
>    else()
> ```
> 
> otherwise I get
> 
> ```
> CMake Error at cmake/modules/LLVM-Build.cmake:85 (get_property):
> get_property could not find TARGET X86.  Perhaps it has not yet been created.
> Call Stack (most recent call first):
> lib/CMakeLists.txt:53 (LLVMBuildResolveComponentsLink)
> ```
> 
> when for example doing cmake like this
> 
> ```
> cmake /my-llvm-repo/llvm --debug-trycompile -G Ninja -DCMAKE_MAKE_PROGRAM=/ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=/compiler-clang -DLLVM_ENABLE_WERROR=ON -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra' -DLLVM_TARGETS_TO_BUILD='MyOOTTarget'  -DLLVM_ENABLE_DOXYGEN=ON
> ```
> 
I think this got fixed by f4a4c63588d4d784f42a94591c46b72bec64a415. Can you confirm?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90848



More information about the llvm-commits mailing list