[LLVMdev] [LLVMDev] Trouble Linking

Jeff Kunkel jdkunk3 at gmail.com
Fri Oct 15 10:28:20 PDT 2010


- I placed my code in the the existing CodeGen library.
- 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. 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.

- Thanks
- Jeff Kunkel

On Fri, Oct 15, 2010 at 11:32 AM, Ó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 am writing my register allocator directly in the LLVM tree, and I am
>> having trouble linking my project on windows msvc 10.0 compiler. The
>> error are below, but let me say what I have changed.
>> 1. I added "(void) llvm::createJDKunkRegisterAllocator();" to the
>> struct ForcePassLinking::ForcePassLinking() method in
>> "llvm\include\llvm\LinkAllPasses.h"
>> 2. I added "FunctionPass* createJDKunkRegisterAllocator();" to header
>> "llvm\CodeGen\Passes.h."
>> 3. I implemented "FunctionPass* createJDKunkRegisterAllocator()" in my cpp file.
>>
>> I know the api change said some items were changed, and it has worked
>> until the api change e-mail came out. However, I cannot figure out
>> what I need to change to have this project link.
>
> Is you register allocator on an existing LLVM library? Which one?
>
> Or did you create a new library for it?
>
> Have you added the new source files to the corresponding CMakeLists.txt
> file ?
>
> [snip]
>




More information about the llvm-dev mailing list