[LLVMdev] how to opt -load on cygwin

Sergey Yakoushkin sergey.yakoushkin at gmail.com
Tue Jun 11 11:37:04 PDT 2013


Hello everyone,

I'm trying to load and run a pass on Cygwin target:
opt -load=mypass.dll -mypass

There is an LLVM example - Hello, however lib/Transforms/Makefile says
# No support for plugins on windows targets
and then excludes Hello from build
ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW Minix))
  PARALLEL_DIRS := $(filter-out Hello, $(PARALLEL_DIRS))
endif

On the other hand, I found old suggestions to use

configure --enable-shared --disable-embed-stdcxx

and then link a pass to LLVM dynamic library, using the following Makefile
for the pass:
...
LOADABLE_MODULE=1
include $(LEVEL)/Makefile.common
LIBS+=-Lpath-to-LLVM -lcygLLVM-3.4svn

I'm able to build the mypass.dll which is linked against cygLLVM-3.4svn.dll.

However, opt load still fails (has no effect).
Are opt plugins still supported for Cygwin target?

Kind Regards,
Sergey Yakushkin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130611/b0e24866/attachment.html>


More information about the llvm-dev mailing list