[LLVMdev] problem with my LLVM pass

Jun Koi junkoi2004 at gmail.com
Thu Oct 18 20:33:25 PDT 2012


On Thu, Oct 18, 2012 at 7:25 PM, Roel Jordans <r.jordans at tue.nl> wrote:
> 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
>

awesome, thanks!

Jun



More information about the llvm-dev mailing list