[llvm-commits] [PATCH] Missing libraries in cmake build?

Tobias Grosser grosser at fim.uni-passau.de
Wed Apr 14 06:50:45 PDT 2010


On 04/12/10 22:44, Chris Lattner wrote:
> On Apr 12, 2010, at 11:39 AM, Tobias Grosser wrote:
>
>> Hi,
>>
>> I get this error using cmake and BUILD_SHARED_LIBS=1 on a build using LLVM trunk + one additional pass added by me.
>
> Hi Tobias,
>
> IPO depending on scalaropts seems fine, but I don't think scalaropts should depend on instcombine.

OK. I analyzed the bug a little bit more.

This commit broke LLVM build with BUILD_SHARED_LIBS=1 (on plain trunk):
-----------------------------------------------------------------------
Author: Wesley Peck <peckw at wesleypeck.com>
Date:   Fri Apr 9 20:43:20 2010 +0000

     Adding IPSCCP and Internalize passes to the C-bindings
-----------------------------------------------------------------------

The issues can be solved by adding this to CMAKE:

target_link_libraries (LLVMipo LLVMScalarOpts LLVMInstCombine)

So scalaropts will not depend on instcombine, however IPO will. This 
sounds OK to me.

I attached a patch. OK to commit?

Tobi
> -Chris
>
>>
>> Linking CXX executable ../../bin/llvm-extract
>> ../../lib/libLLVMipo.so: undefined reference to `llvm::createIPSCCPPass()'
>> collect2: ld returned 1 exit status
>> gmake[2]: *** [bin/llvm-extract] Error 1
>> gmake[1]: *** [tools/llvm-extract/CMakeFiles/llvm-extract.dir/all] Error 2
>> gmake: *** [all] Error 2
>>
>> For me it seems there are some libraries missing in the CMakeLists.txt
>> files. The problem does not appear neither with a clean trunk nor with LLVM + my patches build using the autotools infrastructure.
>>
>> However the patch solves the build issues on my side and they seem to be consistent as IPO really uses a function defined in ScalarOpt.
>>
>> Therefore I believe this is correct and propose this patch for LLVM trunk.
>>
>> OK to commit?
>>
>> Thanks
>>
>> Tobi
>> <llvm_Add-missing-libraries-to-cmake.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-missing-libraries-to-IPO-to-fix-the-CMAKE-build.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100414/fdd51fa3/attachment.ksh>


More information about the llvm-commits mailing list