[llvm] da83b70 - [examples] Fix Kaleidoscope for Windows
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 18 20:21:01 PDT 2021
Author: Lang Hames
Date: 2021-08-19T13:20:51+10:00
New Revision: da83b70a6fe602f047c8007009cfd646a2166cce
URL: https://github.com/llvm/llvm-project/commit/da83b70a6fe602f047c8007009cfd646a2166cce
DIFF: https://github.com/llvm/llvm-project/commit/da83b70a6fe602f047c8007009cfd646a2166cce.diff
LOG: [examples] Fix Kaleidoscope for Windows
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
Added:
Modified:
llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
Removed:
################################################################################
diff --git a/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h b/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
index 18a4c111a5275..457a2d44e87f1 100644
--- a/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
+++ b/llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
@@ -54,6 +54,10 @@ class KaleidoscopeJIT {
MainJD.addGenerator(
cantFail(DynamicLibrarySearchGenerator::GetForCurrentProcess(
DL.getGlobalPrefix())));
+ if (JTMB.getTargetTriple().isOSBinFormatCOFF()) {
+ ObjectLayer.setOverrideObjectFlagsWithResponsibilityFlags(true);
+ ObjectLayer.setAutoClaimResponsibilityForObjectSymbols(true);
+ }
}
~KaleidoscopeJIT() {
More information about the llvm-commits
mailing list