against it. This affects Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111240
91177308-0d34-0410-b5e6-
96231b3b80d8
StringRef MArch,
StringRef MCPU,
const SmallVectorImpl<std::string>& MAttrs) {
+ // Try to register the program as a source of symbols to resolve against.
+ sys::DynamicLibrary::LoadLibraryPermanently(0, NULL);
+
// Pick a target either via -march or by guessing the native arch.
TargetMachine *TM = JIT::selectTarget(M, MArch, MCPU, MAttrs, ErrorStr);
if (!TM || (ErrorStr && ErrorStr->length() > 0)) return 0;