[LLVMdev] opt seems to ignore -load (Win32)

philipp.legrum at daimler.com philipp.legrum at daimler.com
Tue Feb 9 08:32:14 PST 2010


Hello Developers,

I was unsuccessfully trying to execute the hello world example described 
in
  http://llvm.org/docs/WritingAnLLVMPass.html
as a dynamic module loaded by opt.

Compiling the hello world example as a .dll file went pretty smoothly. An
  opt -load <file.dll> -hello source.bc -o result.bc
would then complain about -hello being an unrecognized option although 
hello was specified like this:
  RegisterPass<Hello> X("hello", "Hello World Pass")


Debugging into opt revealed that it recognized -load, however, would not 
make the option available.

The used environment is:
  WindowsXP 32Bit
  Visual Studio 2008
  CMake 2.8.0
 
No difference between LLVM 2.6 and the current svn version.

Question: Is dynamic module loading (dll files) supported on Windows at 
all? Or is it a better idea to use MinGW and try loading .so files, 
instead?

Thanks in advance for your support.

Sincerely,
Philipp Legrum 

If you are not the intended addressee, please inform us immediately that you have received this e-mail in error, and delete it. We thank you for your cooperation.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100209/8da12b3b/attachment.html>


More information about the llvm-dev mailing list