Skip to content

Commit

Permalink
[examples] Fix Kaleidoscope for Windows
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lhames committed Aug 19, 2021
1 parent e4888be commit da83b70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
Expand Up @@ -54,6 +54,10 @@ class KaleidoscopeJIT {
MainJD.addGenerator(
cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
DL.getGlobalPrefix())));
if (JTMB.getTargetTriple().isOSBinFormatCOFF()) {
ObjectLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);
ObjectLayer.setAutoClaimResponsibilityForObjectSymbols(true);
}
}

~KaleidoscopeJIT() {
Expand Down

0 comments on commit da83b70

Please sign in to comment.