<div dir="ltr">Hi all,<div><br></div><div>First of all, I want to say that I really appreciate all the work that's gone into LLVM, clang and the ORC API. I would be very unlikely to be doing my current project if they weren't available.  <br></div><div><br></div><div>I'm using the ORC API to JIT some C code (soon to be C++) on Windows. </div><div><div>(I was on LLVM 8.0.0 but it didn't handle the 'allocator' attribute so I upgraded to LLVM 9.0.0.)</div><div></div></div><div><br></div><div>The JIT compiling works well for simple files, #included local files and object files.</div><div>As soon as I start trying to use system libraries with functions, things start to fall down.</div><div>I think this is largely just due to my ignorance of clang in general, but any guidance would be greatly appreciated.</div><div><br></div><div><br></div><div>1) I get multiple warnings for the system headers (e.g. stdlib) of the form:</div><div>"warning: macro expansion producing 'defined' has undefined behavior"</div><div><br></div><div>Is there a way to prevent these warnings? Preferably only for the system libraries.</div><div>I tried -Wno-expansion-to-defined, -fms-extensions, -fms-compatibility-fms, -compatibility-version=14.16.27023. I also tried to reference the system library folder by -isystem, -internal-isystem and -c-isystem</div><div><br></div><div><br></div><div>2) Disregarding the warnings, I also get the following error message:</div><div>"JIT session error: Symbols not found: { malloc }"<br></div><div><br></div><div>I assumed this might be because I wasn't linking the standard library, so I tried appending "msvcrt.lib" and "-stdlib=msvcrt.lib" but to no avail. Can you use .lib files with clang on Windows?</div><div><br></div><div>How do I make sure that the symbols defined in the standard libraries are available to my JIT?</div><div><br></div><div><br></div><div>Thanks for any help you can give!</div><div>All the best,</div><div>Andrew</div></div>