I am trying to write LLVM backend for TOY.
I created Folder called TOY under llvm-project/llvm/lib/Target.
I did the following :
Defining registers and register sets
Defining the calling convention
Defining the instruction set
Implementing frame lowering
Printing an instruction
Selecting an instruction
Adding instruction encoding
Supporting a subtarget
Lowering to multiple instructions
To register a TOY:
I edited following files to include TOY:
llvm_root_dir/CMakeLists.txt
llvm_root_dir/include/llvm/ADT/Triple.h
llvm_root_dir/include/llvm/ MC/MCExpr.h
llvm/lib/MC/MCExpr.cpp
llvm/lib/Support/Triple.cpp
lib/Target/LLVMBuild.txt
When I try to build using cmake -G Ninja …/llvm -DLLVM_TARGETS_TO_BUILD=“TOY” -DCMAKE_BUILD_TYPE=Release
I am getting error as llvm-build: error: invalid target to enable: ‘TOY’ (not in project)
Thank You