<div dir="ltr">Hi!<div><br></div><div>So after seeing the great tutorial on the new LLJit by Lang Hames, I went ahead and converted my llvm jitter. I much prefer this new API, btw.</div><div><br></div><div>It's starting to work well, except on Windows. Any extern "C" exported symbol leads to assertions about mismatching symbol flags. Tracing through the inconsistency, it seems JITSymbolFlags::fromObjectSymbol returns a different result than what the frontend (?) expects. <br><br>Namely, exported symbols in COFFObjectFiles are flagged with SF_Global, not SF_Exported. fromObjectSymbol ignores that flag. Previously I had this working with varying levels of success by flagging jit symbols as exported if SF_Global exists (or alternatively have COFFObjectFile::getSymbolFlags flag both SF_Global and SF_Exported).</div><div><br></div><div>But this breaks in other ways....</div><div><br></div><div>Looking at git blame, I can see I'm not the first one to try this hack (?), so I wanted to ask whether there are any workarounds or planned work to get the LLJit working on Windows?</div><div><br></div><div>I've attached an example llvm module that breaks.</div><div>Additionally, it seems lljit doesn't record constructors properly? Attached a diff for a fix.</div><div><br></div><div>Regards, Janus</div></div>