Hi again everyone... After following the "Writing an LLVM Pass" tutorial using LLVM 2.5, there is a part that states that: "This makefile specifies that all of the .cpp files in the current directory are to be compiled and linked together into a Debug/lib/Hello.so shared object that can be dynamically loaded by the opt or bugpoint tools via their -load options." http://llvm.org/docs/WritingAnLLVMPass.html#makefile However, I find that on both my Mac laptop and Mac desktop no such .so files are built (nor the Debug/ directory), and this is also the case with the Hello example pass that comes pre-packaged with the source. Is this a known OS X problem that anyone has any experience with? Or is the documentation slightly out of date? When building the Hello pass, it just creates a Release/ directory, which has a /bin containing Hello.d, Hello.o and Hello.lo. Is this normal? I'm fairly sure all of my Makefiles are correct when checked against the documentation. If all else fails I have a Linux machine in the lab I can test this with on Monday. Thanks in advance. James -- View this message in context: http://www.nabble.com/Shared-objects-not-being-built-on-OS-X-tp22745195p22745195.html Sent from the LLVM - Dev mailing list archive at Nabble.com.
On Mar 27, 2009, at 10:48 AM, jstanier wrote:> "This makefile specifies that all of the .cpp files in the current > directory > are to be compiled and linked together into a Debug/lib/Hello.so > shared > objectIs there a .dylib file? If so, and it works, the docs could be updated.
On Fri, Mar 27, 2009 at 11:18 PM, jstanier <j.stanier at sussex.ac.uk> wrote:> > Hi again everyone... > > After following the "Writing an LLVM Pass" tutorial using LLVM 2.5, there > is > a part that states that: > > "This makefile specifies that all of the .cpp files in the current > directory > are to be compiled and linked together into a Debug/lib/Hello.so shared > object that can be dynamically loaded by the opt or bugpoint tools via > their > -load options." > > http://llvm.org/docs/WritingAnLLVMPass.html#makefile > > However, I find that on both my Mac laptop and Mac desktop no such .so > files > are built (nor the Debug/ directory), and this is also the case with the > Hello example pass that comes pre-packaged with the source. Is this a known > OS X problem that anyone has any experience with? Or is the documentation > slightly out of date? > > When building the Hello pass, it just creates a Release/ directory, which > has a /bin containing Hello.d, Hello.o and Hello.lo. Is this normal? I'm > fairly sure all of my Makefiles are correct when checked against the > documentation. >the .so file gets build in the directory <path to llvm installation>/llvm-2.4/Release/lib/ for the 2.4 release. I think i should be similar for other releases -- Kshitiz Garg Graduate Student Department of Computer Science & Engineering IIT Kanpur http://home.iitk.ac.in/~kshitizg -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090328/ca7c33e5/attachment.html>
Thanks to you both. Firstly, on Mac OS X a .dylib file is built instead of a .so file. Secondly, this does indeed reside in llvm-location/Release/lib. The .dylib file seems to link into the opt tool without any problem. Best, James -- View this message in context: http://www.nabble.com/Shared-objects-not-being-built-on-OS-X-tp22745195p22755918.html Sent from the LLVM - Dev mailing list archive at Nabble.com.