[LLVMdev] Win32 JIT issue + bug in ScheduleDAGSNodes.h?

srs
Wed, 31 Dec 2008 02:40:04 -0000

<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">


Óscar Fuentes wrote:
<blockquote cite="mid:m3myedum6e.fsf@telefonica.net"
type="cite">
srs <a class="moz-txt-link-rfc2396E"
href="mailto:skaflotten@gmail.com"><skaflotten@gmail.com>
writes:






Try adding this to the link command of
your executable:

/INCLUDE:_X86TargetMachineModule

I should document this somehow.



Yeah, this is necessary, but not
sufficient. I also had to link with
ExecutionEngineBindings.obj (not JIT.obj as first stated)



So you are using the C bindings. Okay, could
someone advise what to do
here? Something like the _X86TargetMachineModule trick on
lib/Target/X86/X86TargetMachine.cpp line 26, but on
lib/ExecutionEngine/ExecutionEngineBindings.cpp?

Why is not the linker automatically pulling that code? If you are using
the C bindings, I suppose that your executable refers to the functions
defined on ExecutionEngineBindings.cpp. It is not the same case as
X86TargetMachine.cpp, which has a self-registering static C++ object and
nothing refers to it from the user's code


I'm actually not using C bindings; I'm
using the C++ API directly. I
have no idea why I have to link that object file.



This is very strange. Can you test if the Fibonacci.exe example runs
quick? (It should show the result almost instantaneously. Discard the
first run: most of that time is the OS loading the executable from disk)

If the Fibonacci example works, please compare its link command options
with your compiler's


The Fibonacci example works just fine; results appear quickly. The link
options are the same AFAICT (except for the addition of
ExecutionEngineBindings.obj...)

/Stein Roger