[LLVMdev] Question of autotools about adding a new target for LLVM

Óscar Fuentes ofv at wanadoo.es
Sun Dec 26 03:55:29 PST 2010


Lu Mitnick <king19880326 at gmail.com> writes:

> I am a beginner of LLVM and want to add a new Target for LLVM. I follow the
> document (http://llvm.org/docs/WritingAnLLVMBackend.html)
>
> to modify autotools/configure.ac. However when I type ./AutoRegen.sh

Never tried it, but for adding a new target to the cmake build you need
to add the target name to this list on $LLVM_ROOT_DIR/CMakeLists.txt:

set(LLVM_ALL_TARGETS
  Alpha
  ARM
  Blackfin
  CBackend
  CellSPU
  ...

Then create the CMakeLists.txt files on your target's directory
with the list of your source files, tablegen calls, etc (you can use any
other target as a model)

Finally, follow http://www.llvm.org/docs/CMake.html for building.

HTH.

[snip]



More information about the llvm-dev mailing list