Issues with Kaleidoscope Lesson 8

I am going through the Kaleidoscope tutorial. I am stuck at Lesson 8: Compiling to Object Code
First issue is #include "llvm/MC/TargetRegistry.h" the file is actually at llvm/Support/TargetRegistry.h

After I include the proper file I still get the error : undefined reference to 'average'
I am not surprised that inspecting the object file shows nothing. I guess I have missed something. Even when I copy-paste the full code it is still not working!

The only thing I am doing differently is building out of tree, but my setup has worked up till now.
I am using LLVM version 13.