<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><div data-html-editor-font-wrapper="true" style="font-family: arial, sans-serif; font-size: 13px;"><signature>Hi,<br><br>When targetting android (which doesn't support tls) I have to pass -mllvm -emulated-tls to get a working executable, however lld fails with:<br><br>lld.exe: error: TLS attribute mismatch: f_t31_RemObjects.Elements.System.SynchronizationContext.fCurrent<br> >>> defined in <internal><br> >>> defined in lto.tmp<br><br>Where<br>@f_t31_RemObjects.Elements.System.SynchronizationContext.fCurrent = hidden thread_local global %._RemObjects.Elements.System.SynchronizationContext* null<br><br>when linking two bitcode files. I'm currently having a bit of trouble reproducing this with a simple testcase so I wanted to ask if anyone knows what could cause this?<br><br>This happens in SymbolTable::insert, the first time it inserts a symbol when loading the Archive file, which sets it as TLS symbol. The second time when it actually did LTO and it's not TLS anymore.<br><br>Carlo Kok<br>RemObjects Software</signature></div></body></html>