This fixes "Resolving symbol with incorrect flags" errors when running the
Kaleidoscope tutorials on Windows.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D108348
MainJD.addGenerator(
cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
DL.getGlobalPrefix())));
+ if (JTMB.getTargetTriple().isOSBinFormatCOFF()) {
+ ObjectLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);
+ ObjectLayer.setAutoClaimResponsibilityForObjectSymbols(true);
+ }
}
~KaleidoscopeJIT() {