On Thu, Oct 18, 2012 at 5:33 PM, Duncan Sands <baldrick at free.fr> wrote:> Hi Jun, > > > On 18/10/12 11:19, Jun Koi wrote: >> >> On Tue, Oct 9, 2012 at 9:25 PM, Jun Koi <junkoi2004 at gmail.com> wrote: >>> >>> On Fri, Oct 5, 2012 at 3:45 PM, Jun Koi <junkoi2004 at gmail.com> wrote: >>>> >>>> On Fri, Oct 5, 2012 at 3:39 PM, David Chisnall >>>> <David.Chisnall at cl.cam.ac.uk> wrote: >>>>> >>>>> On 5 Oct 2012, at 08:34, Jun Koi wrote: >>>>> >>>>>> any idea on how to fix the problem? >>>>> >>>>> >>>>> The correct solution is to fix the LLVM build to install the .cmake >>>>> files in a location that CMake knows about. >>>> >>>> >>>> could you please elaborate? >>>> >>>>> The hacky solution that I've used is just to copy them into the >>>>> correct place manually. >>>> >>>> >>>> could you please elaborate? what do i need to copy, and where? >>>> >>>> if that matters, i compiled and installed llvm 3.1 from source in normal >>>> way: >>>> >>>> ./configure; make; make install >>> >>> >>> any help on this sample LLVM pass, please? >> >> >> any help, please? i am still stuck on this problem. > > > don't use cmake? >you mean i should not use cmake? what is wrong here? cmake is still preferred as i want to compile my code with MS Visual Studio on Windows, too. thanks, Jun
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. Ciao, Duncan.
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? (2) is it (pass compilation) possible without the LLVM source code? thanks, Jun> > Ciao, Duncan.