Muhammad Umar Janjua via llvm-dev
2016-Mar-23 16:11 UTC
[llvm-dev] Building ModulePass independiently on win32
Hi, I have written a ModulePass (c++ code) that does transformation to LLVM bytecode. How do I build,compile and run it on windows. a) I need Win32 LLVM tools. (so I downloaded)b) How do I build the dll( modulepass) so that I can pass it to optimizer or other llvm tool.c) To test, I need to compile a test C code, emit llvm intermediate code and pass it to optimizer so that it can run my transformation on it. I am using windows. Any suggestion of cmdline steps\tools for the above steps will be appreciated.Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160323/5b49074d/attachment.html>
Reid Kleckner via llvm-dev
2016-Mar-23 21:04 UTC
[llvm-dev] Building ModulePass independiently on win32
Loadable modules are not currently supported on Windows, unfortunately. If you directly add your pass to llvm/lib/Transforms/IPO and rebuild opt, you will probably get further faster. On Wed, Mar 23, 2016 at 9:11 AM, Muhammad Umar Janjua via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi, > > I have written a ModulePass (c++ code) that does transformation to LLVM > bytecode. How do I build,compile and run it on windows. > > a) I need Win32 LLVM tools. (so I downloaded) > b) How do I build the dll( modulepass) so that I can pass it to optimizer > or other llvm tool. > c) To test, I need to compile a test C code, emit llvm intermediate code > and pass it to optimizer so that it can run my transformation on it. > > > I am using windows. Any suggestion of cmdline steps\tools for the above > steps will be appreciated. > Thanks > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160323/1b40b6a9/attachment.html>
Muhammad Umar Janjua via llvm-dev
2016-Apr-05 23:57 UTC
[llvm-dev] Building llvm1.6 on ubuntu 14.
I just had an old project with llvm1.6. I tried to compile it on the ubuntu 14.. First, I copied cfrontend, called ./fixheaders and then did configure. Everything worked well. It required g++/bison/flex, which I installed. Then I tried to use make ( no gmake). It gave these errors... Any wonder..how to fix this. ubuntu at ubuntu:~/build1.6$ make make[1]: Entering directory `/home/ubuntu/build1.6/lib/System' llvm[1]: Compiling Path.cpp for Debug build In file included from /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp:14:0: /home/ubuntu/build1.6/../llvm/include/llvm/System/Path.h:250:33: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] const char* const c_str() const { return path.c_str(); } ^ /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp: In function ‘llvm::sys::LLVMFileType llvm::sys::IdentifyFileType(const char*, unsigned int)’: /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp:52:39: error: ‘memcmp’ was not declared in this scope if (memcmp(magic,"!<arch>\n",8) == 0) ^ make[1]: *** [/home/ubuntu/build1.6/lib/System/Debug/Path.o] Error 1 make[1]: Leaving directory `/home/ubuntu/build1.6/lib/System' make: *** [all] Error 1 ubuntu at ubuntu:~/build1.6$ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160405/93159052/attachment.html>
Muhammad Umar Janjua via llvm-dev
2016-Apr-07 18:18 UTC
[llvm-dev] Building llvm1.6 on ubuntu 14.
I have not seen my message posted. Can you let me know what's the issue. From: Muhammad Umar Janjua <umar_janjua at yahoo.com> To: Llvm-dev <llvm-dev at lists.llvm.org> Sent: Tuesday, 5 April 2016, 16:57 Subject: Building llvm1.6 on ubuntu 14. I just had an old project with llvm1.6. I tried to compile it on the ubuntu 14.. First, I copied cfrontend, called ./fixheaders and then did configure. Everything worked well. It required g++/bison/flex, which I installed. Then I tried to use make ( no gmake). It gave these errors... Any wonder..how to fix this. ubuntu at ubuntu:~/build1.6$ make make[1]: Entering directory `/home/ubuntu/build1.6/lib/System' llvm[1]: Compiling Path.cpp for Debug build In file included from /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp:14:0: /home/ubuntu/build1.6/../llvm/include/llvm/System/Path.h:250:33: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] const char* const c_str() const { return path.c_str(); } ^ /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp: In function ‘llvm::sys::LLVMFileType llvm::sys::IdentifyFileType(const char*, unsigned int)’: /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp:52:39: error: ‘memcmp’ was not declared in this scope if (memcmp(magic,"!<arch>\n",8) == 0) ^ make[1]: *** [/home/ubuntu/build1.6/lib/System/Debug/Path.o] Error 1 make[1]: Leaving directory `/home/ubuntu/build1.6/lib/System' make: *** [all] Error 1 ubuntu at ubuntu:~/build1.6$ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160407/826edd10/attachment.html>
mats petersson via llvm-dev
2016-Apr-08 08:06 UTC
[llvm-dev] Building llvm1.6 on ubuntu 14.
On 6 April 2016 at 00:57, Muhammad Umar Janjua via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I just had an old project with llvm1.6. > > I tried to compile it on the ubuntu 14.. > > First, I copied cfrontend, called ./fixheaders and then did configure. > > Everything worked well. It required g++/bison/flex, which I installed. > > Then I tried to use make ( no gmake). It gave these errors... > > Any wonder..how to fix this. > > > > ubuntu at ubuntu:~/build1.6$ make > make[1]: Entering directory `/home/ubuntu/build1.6/lib/System' > llvm[1]: Compiling Path.cpp for Debug build > In file included from > /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp:14:0: > /home/ubuntu/build1.6/../llvm/include/llvm/System/Path.h:250:33: warning: > type qualifiers ignored on function return type [-Wignored-qualifiers] > const char* const c_str() const { return path.c_str(); } >Probably harmless... Maybe remove the extra const - it makes little or no difference.> ^ > /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp: In function > ‘llvm::sys::LLVMFileType llvm::sys::IdentifyFileType(const char*, unsigned > int)’: > /home/ubuntu/build1.6/../llvm/lib/System/Path.cpp:52:39: error: ‘memcmp’ > was not declared in this scope > if (memcmp(magic,"!<arch>\n",8) == 0) >Looks like the typical case of "something used to drag in a header file that some code depends on, and now it doesn't" - add #include <cstring> to the list of #includes in Path.cpp. Since 1.6 is 11 years old, it's not entirely surprising that there will be warnings and errors because of changes in the compilers and header files in between. -- Mats> ^ > make[1]: *** [/home/ubuntu/build1.6/lib/System/Debug/Path.o] Error 1 > make[1]: Leaving directory `/home/ubuntu/build1.6/lib/System' > make: *** [all] Error 1 > ubuntu at ubuntu:~/build1.6$ > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160408/25917e9f/attachment.html>