[LLVMdev] [LLVMDev] Trouble Linking

Jeff Kunkel jdkunk3 at gmail.com
Fri Oct 15 11:48:15 PDT 2010


So, how do I now link in a custom register allocator now? I am missing
a call to the new API initializePass in opt and bugpoint because I am
lost.

Thanks,
Jeff Kunkel


On Fri, Oct 15, 2010 at 1:51 PM, Jeff Kunkel <jdkunk3 at gmail.com> wrote:
> I ran cmake to build the visual studio projects. Then I included my
> code under the Visual Studio interface, but I placed my code separate
> from the CodeGen code. Visual studio was smart enough to compile and
> link in my code into the CodeGen library. Thus, I did not need to add
> my code into the same directory as the CodeGen files, and I did not
> need to change the CMakeList.txt.
>
> The offical name is LLVMCodeGen.
>
> However, the "opt.obj" and "bugpoint.obj" cannot find the reference
> function "llvm::createJDKunkRegisterAllocator." I added this file to
> the header described previously. I implemented it, in my
> RegAllocJDKunk.cpp file.
>
> Jeff Kunkel
>
>
> On Fri, Oct 15, 2010 at 1:43 PM, Óscar Fuentes <ofv at wanadoo.es> wrote:
>> The following message is a courtesy copy of an article
>> that has been posted to gmane.comp.compilers.llvm.devel as well.
>>
>> Jeff Kunkel <jdkunk3 at gmail.com> writes:
>>
>>> - I placed my code in the the existing CodeGen library.
>>
>> Ok.
>>
>>> - No, it is not in the CMakeLists.txt. The code is separate from the
>>> rest of the CodeGen code, but it is linked into the code gen library
>>> automatically through the visual studio linker.
>>
>> If your source code is on a separate file, and that file is not listed
>> on the CMakeLists.txt file, it is not being compiled.
>>
>>> Perhaps something
>>> funny is going on here. I will try placing the code directly in the
>>> library, and I will include it to the CMakeLists.txt.
>>
>> I'm confused. What means "placing the code directly in the library"?
>>
>> Please describe where you wrote your code, specifying file names and
>> directories.
>>
>




More information about the llvm-dev mailing list