[LLVMdev] problem with my LLVM pass

Roel Jordans r.jordans at tue.nl
Thu Oct 18 04:25:35 PDT 2012


Hi Jun,

On 18/10/12 12:11, Jun Koi wrote:
> On Thu, Oct 18, 2012 at 5:42 PM, Duncan Sands <baldrick at free.fr> wrote:
>> Hi Jun,
>>
>>
>>>> don't use cmake?
>>>>
>>>
>>> you mean i should not use cmake? what is wrong here?
>>
>>
>> LLVM cmake support is missing all kinds of features compared to
>> configure+make
>> (search for cmake bug reports in bugzilla to find these).  Your issue is
>> probably just another missing feature.  So if you don't want to hack on
>> cmake I
>> suggest you use configure+make if possible.
>>
>>
>>> cmake is still preferred as i want to compile my code with MS Visual
>>> Studio on Windows, too.
>>
>>
>> In order to make progress on your pass I suggest you use configure and make
>> for
>> the moment, and in parallel try to resolve the cmake problem yourself.
>
> this is a smart idea, thanks!
>
> so i moved the code to under llvm-3.1.src/lib/Transforms/, and use the
> Makefile from http://www.llvm.org/docs/WritingAnLLVMPass.html#makefile
> all the compilation went flawless without any problem.
>
> then this requires me to put my code into the LLVM source tree, and i
> dont like this.
> i tried to move my code and my Makefile elsewhere, and compilation failed.
> so the questions are:
>
> (1) how can i fix the Makefile, so i can compile my pass from anywhere?
>

You can use the sample project as a template to get your code outside of 
the LLVM source tree. That worked for me.

More info: http://llvm.org/docs/Projects.html

Cheers,
  Roel

> (2) is it (pass compilation) possible without the LLVM source code?
>
> thanks,
> Jun
>
>> Ciao, Duncan.



More information about the llvm-dev mailing list