[llvm] r373555 - [gicombiner] Make rL373551 compatible with older cmakes

Fedor Sergeev via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 3 05:17:55 PDT 2019


I'm seeing this failure as well.
The following cmake invocation fails with both newest (3.15.4) and older 
(3.5.1) cmakes:
    cmake -DLLVM_LINK_LLVM_DYLIB=ON

Apparently, cmake cant handle cyclic dependency with SHARED LLVM library.

regards,
   Fedor.

On 10/3/19 1:38 PM, Kristina Brooks via llvm-commits wrote:
> Hi,
>
> Do you mind looking into this failure? The OBJECT->STATIC change seems
> to have broken newer CMakes.
>
> Specifically, it seems that the dynamic libLLVM + Modules builds are
> failing now (log from cmake version 3.10.2 below, from a clean cache):
>
> -- Configuring done
> CMake Error: The inter-target dependency graph contains the following
> strongly connected component (cycle):
>    "llvm-tblgen" of type EXECUTABLE
>      depends on "LLVM" (weak)
>    "intrinsics_gen" of type UTILITY
>      depends on "llvm-tblgen" (strong)
>    "LLVMCore" of type STATIC_LIBRARY
>      depends on "AttributeCompatFuncTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "AttributeCompatFuncTableGen" of type UTILITY
>      depends on "llvm-tblgen" (strong)
>    "LLVMFuzzMutate" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMIRReader" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMCodeGen" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMSelectionDAG" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMAsmPrinter" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMMIRParser" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMGlobalISel" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMBitReader" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMBitWriter" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMTransformUtils" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMInstrumentation" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMAggressiveInstCombine" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMInstCombine" of type STATIC_LIBRARY
>      depends on "InstCombineTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "InstCombineTableGen" of type UTILITY
>      depends on "llvm-tblgen" (strong)
>    "LLVMScalarOpts" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMipo" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMVectorize" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMObjCARCOpts" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMCoroutines" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMLinker" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMAnalysis" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMLTO" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMObject" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMExecutionEngine" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMInterpreter" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMJITLink" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMMCJIT" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMOrcJIT" of type STATIC_LIBRARY
>      depends on "LLVMAnalysis" (weak)
>      depends on "LLVMCore" (weak)
>      depends on "LLVMObject" (weak)
>      depends on "LLVMBitReader" (weak)
>      depends on "LLVMProfileData" (weak)
>      depends on "LLVMBitWriter" (weak)
>      depends on "LLVMPasses" (weak)
>      depends on "LLVMAggressiveInstCombine" (weak)
>      depends on "LLVMTransformUtils" (weak)
>      depends on "LLVMCodeGen" (weak)
>      depends on "LLVMScalarOpts" (weak)
>      depends on "LLVMInstCombine" (weak)
>      depends on "LLVMTarget" (weak)
>      depends on "LLVMInstrumentation" (weak)
>      depends on "LLVMVectorize" (weak)
>      depends on "LLVMipo" (weak)
>      depends on "LLVMIRReader" (weak)
>      depends on "LLVMAsmParser" (weak)
>      depends on "LLVMLinker" (weak)
>      depends on "intrinsics_gen" (strong)
>    "LLVMRuntimeDyld" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMTarget" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMX86CodeGen" of type STATIC_LIBRARY
>      depends on "X86CommonTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "X86CommonTableGen" of type UTILITY
>      depends on "intrinsics_gen" (strong)
>      depends on "llvm-tblgen" (strong)
>    "LLVMX86AsmParser" of type STATIC_LIBRARY
>      depends on "X86CommonTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "LLVMX86Disassembler" of type STATIC_LIBRARY
>      depends on "X86CommonTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "LLVMX86Desc" of type STATIC_LIBRARY
>      depends on "X86CommonTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "LLVMX86Info" of type STATIC_LIBRARY
>      depends on "X86CommonTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "LLVMX86Utils" of type STATIC_LIBRARY
>      depends on "X86CommonTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "LLVMAsmParser" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMProfileData" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMCoverage" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMPasses" of type STATIC_LIBRARY
>      depends on "intrinsics_gen" (strong)
>    "LLVMDlltoolDriver" of type STATIC_LIBRARY
>      depends on "DllOptionsTableGen" (strong)
>    "DllOptionsTableGen" of type UTILITY
>      depends on "llvm-tblgen" (strong)
>    "LLVMLibDriver" of type STATIC_LIBRARY
>      depends on "LibOptionsTableGen" (strong)
>      depends on "intrinsics_gen" (strong)
>    "LibOptionsTableGen" of type UTILITY
>      depends on "llvm-tblgen" (strong)
>    "LLVM" of type SHARED_LIBRARY
>      depends on "LLVMCore" (weak)
>      depends on "LLVMFuzzMutate" (weak)
>      depends on "LLVMAnalysis" (weak)
>      depends on "LLVMObject" (weak)
>      depends on "LLVMBitReader" (weak)
>      depends on "LLVMProfileData" (weak)
>      depends on "LLVMBitWriter" (weak)
>      depends on "LLVMScalarOpts" (weak)
>      depends on "LLVMAggressiveInstCombine" (weak)
>      depends on "LLVMTransformUtils" (weak)
>      depends on "LLVMInstCombine" (weak)
>      depends on "LLVMTarget" (weak)
>      depends on "LLVMIRReader" (weak)
>      depends on "LLVMAsmParser" (weak)
>      depends on "LLVMCodeGen" (weak)
>      depends on "LLVMSelectionDAG" (weak)
>      depends on "LLVMAsmPrinter" (weak)
>      depends on "LLVMMIRParser" (weak)
>      depends on "LLVMGlobalISel" (weak)
>      depends on "LLVMInstrumentation" (weak)
>      depends on "LLVMipo" (weak)
>      depends on "LLVMLinker" (weak)
>      depends on "LLVMVectorize" (weak)
>      depends on "LLVMObjCARCOpts" (weak)
>      depends on "LLVMCoroutines" (weak)
>      depends on "LLVMLTO" (weak)
>      depends on "LLVMPasses" (weak)
>      depends on "LLVMExecutionEngine" (weak)
>      depends on "LLVMRuntimeDyld" (weak)
>      depends on "LLVMInterpreter" (weak)
>      depends on "LLVMJITLink" (weak)
>      depends on "LLVMMCJIT" (weak)
>      depends on "LLVMOrcJIT" (weak)
>      depends on "LLVMX86CodeGen" (weak)
>      depends on "LLVMX86Desc" (weak)
>      depends on "LLVMX86Info" (weak)
>      depends on "LLVMX86Utils" (weak)
>      depends on "LLVMX86AsmParser" (weak)
>      depends on "LLVMX86Disassembler" (weak)
>      depends on "LLVMCoverage" (weak)
>      depends on "LLVMDlltoolDriver" (weak)
>      depends on "LLVMLibDriver" (weak)
> At least one of these targets is not a STATIC_LIBRARY.  Cyclic
> dependencies are allowed only among static libraries.
> -- Build files have been written to: /o/b/llvm-10/409
>
> I'm reverting this change for now, I'm not sure what the best solution
> is, since `CodeExpander.cpp` seems to have caused some bots to fail
> earlier when built as an OBJECT.
>
> It may be worth checking the CMake version and adjusting accordingly
> but that seems like a hack more than a proper solution.
>
> Thank you.
>
> On Thu, Oct 3, 2019 at 2:46 AM Daniel Sanders via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Author: dsanders
>> Date: Wed Oct  2 18:49:04 2019
>> New Revision: 373555
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=373555&view=rev
>> Log:
>> [gicombiner] Make rL373551 compatible with older cmakes
>>
>> Newer cmakes appear to be more flexible w.r.t object libraries. Convert to
>> a static library so that it works with older cmakes too
>>
>> Modified:
>>      llvm/trunk/unittests/TableGen/CMakeLists.txt
>>      llvm/trunk/utils/TableGen/CMakeLists.txt
>>      llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt
>>
>> Modified: llvm/trunk/unittests/TableGen/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/TableGen/CMakeLists.txt?rev=373555&r1=373554&r2=373555&view=diff
>> ==============================================================================
>> --- llvm/trunk/unittests/TableGen/CMakeLists.txt (original)
>> +++ llvm/trunk/unittests/TableGen/CMakeLists.txt Wed Oct  2 18:49:04 2019
>> @@ -5,7 +5,6 @@ set(LLVM_LINK_COMPONENTS
>>
>>   add_llvm_unittest(TableGenTests
>>     CodeExpanderTest.cpp
>> -  $<TARGET_OBJECTS:obj.LLVMTableGenGlobalISel>
>>     )
>> -
>>   include_directories(${CMAKE_SOURCE_DIR}/utils/TableGen)
>> +target_link_libraries(TableGenTests PRIVATE LLVMTableGenGlobalISel)
>>
>> Modified: llvm/trunk/utils/TableGen/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=373555&r1=373554&r2=373555&view=diff
>> ==============================================================================
>> --- llvm/trunk/utils/TableGen/CMakeLists.txt (original)
>> +++ llvm/trunk/utils/TableGen/CMakeLists.txt Wed Oct  2 18:49:04 2019
>> @@ -51,6 +51,6 @@ add_tablegen(llvm-tblgen LLVM
>>     X86RecognizableInstr.cpp
>>     WebAssemblyDisassemblerEmitter.cpp
>>     CTagsEmitter.cpp
>> -  $<TARGET_OBJECTS:obj.LLVMTableGenGlobalISel>
>>     )
>> +target_link_libraries(llvm-tblgen PRIVATE LLVMTableGenGlobalISel)
>>   set_target_properties(llvm-tblgen PROPERTIES FOLDER "Tablegenning")
>>
>> Modified: llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt?rev=373555&r1=373554&r2=373555&view=diff
>> ==============================================================================
>> --- llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt (original)
>> +++ llvm/trunk/utils/TableGen/GlobalISel/CMakeLists.txt Wed Oct  2 18:49:04 2019
>> @@ -2,6 +2,6 @@ set(LLVM_LINK_COMPONENTS
>>     Support
>>     )
>>
>> -llvm_add_library(LLVMTableGenGlobalISel OBJECT
>> +llvm_add_library(LLVMTableGenGlobalISel STATIC
>>                    CodeExpander.cpp
>>                   )
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list