Kevin Tew via llvm-dev
2020-Jan-07 11:42 UTC
[llvm-dev] LLVM 9.0.0 ORC JIT on windows, Duplicate definition of symbol '__real@
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. Following the advice here, http://lists.llvm.org/pipermail/llvm-dev/2019-January/128812.html, I added: 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 at 3ff0000000000000' Any pointers or help would be appreciated, Kevin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200107/272f31c3/attachment.html>
Machiel van Hooren via llvm-dev
2020-Jan-10 10:28 UTC
[llvm-dev] LLVM 9.0.0 ORC JIT on windows, Duplicate definition of symbol '__real@
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. > > Following the advice here, > http://lists.llvm.org/pipermail/llvm-dev/2019-January/128812.html, I > added: > 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 at 3ff0000000000000' > > Any pointers or help would be appreciated, > > Kevin > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200110/18a52e63/attachment.html>