[PATCH] D90848: llvmbuildectomy - part 2
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 01:41:23 PST 2020
bjope added inline comments.
Herald added a subscriber: lxfind.
================
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)
----------------
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
```
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