[llvmbuildectomy] Also include component groups in llvm-config --components list
authorMariusz Ceier <mceier+llvm@gmail.com>
Thu, 26 Nov 2020 20:03:22 +0000 (21:03 +0100)
committerserge-sans-paille <sguelton@redhat.com>
Thu, 26 Nov 2020 20:05:56 +0000 (21:05 +0100)
Without this change mesa fails while looking for llvm components like amdgpu, engine or native:

    Run-time dependency LLVM (modules: amdgpu(missing), bitreader, bitwriter, core, engine(missing), executionengine, instcombine, ipo, mcdisassembler, mcjit, native(missing), scalaropts, transformutils, coroutines)
    Looking for a fallback subproject for the dependency llvm (modules: bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, transformutils, instcombine, amdgpu, native, bitreader, ipo)

This change adds component groups (like all-targets, engine, native, amdgpu) to the "all" component.

Differential Revision: https://reviews.llvm.org/D92158

llvm/cmake/modules/LLVM-Build.cmake

index ce56273..525186c 100644 (file)
@@ -11,12 +11,9 @@ function(LLVMBuildGenerateCFragment)
     list(APPEND all_component_libdeps ${component_name})
   endforeach()
   list(APPEND llvmbuild_components all)
-  list(APPEND llvmbuild_components all-targets)
-  list(APPEND llvmbuild_components Engine)
-  list(APPEND llvmbuild_components Native)
-  list(APPEND llvmbuild_components NativeCodeGen)
-  foreach(llvm_target_to_build ${LLVM_TARGETS_TO_BUILD})
-    list(APPEND llvmbuild_components ${llvm_target_to_build})
+  foreach(llvm_component all-targets Engine Native NativeCodeGen ${LLVM_TARGETS_TO_BUILD})
+    list(APPEND llvmbuild_components ${llvm_component})
+    list(APPEND all_component_libdeps ${llvm_component})
   endforeach()
 
   list(LENGTH llvmbuild_components llvmbuild_components_size)