Many quoted code blocks were not in sync with the actual toy.cpp files.
Improved tutorial text slightly in several places.
Added some step descriptions crucial to avoid crashes (like InitializeNativeTarget* calls).
Solve/workaround problems with Windows (JIT'ed method not found, using custom and standard library functions from host process)
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
docs/tutorial/LangImpl03.rst | ||
---|---|---|
536 ↗ | (On Diff #88095) | 80 cols? |
Sure, the Windows specific changes work fine on Windows.
No, I don't have commit access.
I wish if this patch were split to;
- Documentation fixes
- Tweaks for current implementation
- Win32 changes
(I don't know how to process multiple patchset on phab in better way, though)
llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp | ||
---|---|---|
1119 | It requires TransformUtils. Fixed in r294881. |
I would also prefer to provide a patch set to have sensibly grouped changes like with git.
About TransformUtils, sorry, I'm building with MSVC and already had all libraries in my project from step 8.
The tutorial steps don't mention the make file, but they use llvm-config to select the libraries.
So "clang++ -g toy.cpp llvm-config --cxxflags --ldflags --system-libs --libs core mcjit native -O3 -o toy" should be updated to "clang++ -g toy.cpp llvm-config --cxxflags --ldflags --system-libs --libs core mcjit native transformutils -O3 -o toy".
I created a patch for this: https://reviews.llvm.org/D29875
It requires TransformUtils. Fixed in r294881.