<div dir="ltr">Hmm, actually, looks intentional from reading Chapter 8 ( <a href="https://llvm.org/docs/tutorial/LangImpl08.html">https://llvm.org/docs/tutorial/LangImpl08.html</a> ) - which says that it's doing it, and explains that the compilation command needs to be different, showing how to use llvm-config for this example.<br><br>One reason might be, though it's not demonstrated, that the default target triple for the LLVM build being used may not be the native target - or it may be overridden at runtime by LLVM_TARGET_TRIPLE_ENV to be not the native target.<br><br>Andy - please check the tutorial for instructions on how to build Chapter 8 (& 9 is probably the same, but the chapter should tell you how to build it if it's any different again).<br><br>- Dave</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 2, 2018 at 9:58 AM Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yeah, likely. :)</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 2, 2018 at 9:53 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey Eric - looks like maybe you & I (when adding this chapter for the debug info tutorial) just made a mistake here initializing all targets rather than only the native target (not like this is doing remote JIT or anything - so I think only the native target should be required)?<br><br>- Dave</div><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Jul 1, 2018 at 7:22 AM Andy via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I am compiling and linking Kaleidoscope sample from 2 to 7 with Code::Blocks, where I have add to compiler settings: `llvm-config --cxxflags` and to linker settings: `llvm-config --ldflags --system-libs --libs core orcjit native`</div><div><br></div><div>In 2 to 7 is OK, but sample 8 has errors:</div><div>||=== Build: Debug in Chapter8 (compiler: LLVM Clang Compiler) ===|<br>obj/Debug/toy.o||In function `llvm::InitializeAllTargetInfos()':|<br>/usr/local/include/llvm/Config/Targets.def|26|undefined reference to `LLVMInitializeAArch64TargetInfo'|<br>/usr/local/include/llvm/Config/Targets.def|27|undefined reference to `LLVMInitializeAMDGPUTargetInfo'|<br>/usr/local/include/llvm/Config/Targets.def|28|undefined reference to `LLVMInitializeARMTargetInfo'|<br>/usr/local/include/llvm/Config/Targets.def|29|undefined reference to <br></div><div>...............................<br></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></blockquote></div>
</blockquote></div>