[llvm-dev] LLVM 9.0.0 ORC JIT on windows, Duplicate definition of symbol '__real@

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] LLVM 9.0.0 ORC JIT on windows, Duplicate definition of symbol '__real@

Jeremy Morse via llvm-dev
I've been using ORC jit based off the Kaleidoscope tutorials successfully on Linux and OS X.  However when I tried to move to windows I'm having troubles.

ObjectLayer.setAutoClaimResponsibilityForObjectSymbols( true );
ObjectLayer.setOverrideObjectFlagsWithResponsibilityFlags( true );

I'm JITTing multiple functions in a loop.
I create the Module and lookup the first function just fine using the following code from the tutorial.

llvm::cantFail( jit->addModule(std::move(mModule)));
auto ExprSymbol = jit->lookup( func_name.c_str( ));

When I go to lookup the second function I'm jitting, I get the following error:
JIT session error: Duplicate definition of symbol '__real@3ff0000000000000'

Any pointers or help would be appreciated,

Kevin



_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] LLVM 9.0.0 ORC JIT on windows, Duplicate definition of symbol '__real@

Jeremy Morse via llvm-dev

Hi Kevin,

Sounds like you have run into this bug: https://bugs.llvm.org/show_bug.cgi?id=40074

A workaround is to build LLVM with HasCOFFComdatConstants set to false in MCAsmInfoCOFF.cpp.

Regards,

Machiel van Hooren


On 07-Jan-20 12:42, Kevin Tew via llvm-dev wrote:
I've been using ORC jit based off the Kaleidoscope tutorials successfully on Linux and OS X.  However when I tried to move to windows I'm having troubles.

ObjectLayer.setAutoClaimResponsibilityForObjectSymbols( true );
ObjectLayer.setOverrideObjectFlagsWithResponsibilityFlags( true );

I'm JITTing multiple functions in a loop.
I create the Module and lookup the first function just fine using the following code from the tutorial.

llvm::cantFail( jit->addModule(std::move(mModule)));
auto ExprSymbol = jit->lookup( func_name.c_str( ));

When I go to lookup the second function I'm jitting, I get the following error:
JIT session error: Duplicate definition of symbol '__real@3ff0000000000000'

Any pointers or help would be appreciated,

Kevin



_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev