[LLVMdev] llvm-mc build fails

Óscar Fuentes ofv at wanadoo.es
Mon Nov 2 02:28:03 PST 2009


John Myers <atomicdog.jwm at gmail.com> writes:

> I'm looking for some pointers on how to troubleshoot this problem. I'm
> trying to write a backend for the AVR.
> There is an undefined reference at line 48 which is the line FrameInfo() is
> on. I've tried to use the MSP430 and other targets as references so I'm not
> sure
> what changes I did would cause a problem on this line?

cmake tracks library dependencies on $LLVM_ROOT/cmake/modules/LLVMLibDeps.txt

That file is automatically updated on Unix and Unix-like platforms when
all LLVM targets are included on the build. This means that either you
update the file manually or run the build with MSYS passing
-DLLVM_TARGETS_TO_BUILD=all on the cmake command line.

The manual update would consist on adding this lines to the above
mentioned file:

set(MSVC_LIB_DEPS_LLVMAVRAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMAVRInfo LLVMSupport LLVMSystem LLVMTarget)
set(MSVC_LIB_DEPS_LLVMAVRCodeGen LLVMCodeGen LLVMCore LLVMMC LLVMAVRInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
set(MSVC_LIB_DEPS_LLVMAVRInfo LLVMSupport)

which uses MSP430 as a template and supposses that your target is named
`AVR' (case sensitive).

In case you use the automatic update, the first run of the build will
fail because the new dependencies are still not effective. Re-execute
the build and it should work.

-- 
Óscar




More information about the llvm-dev mailing list