[LLVMdev] LLVS newbie adding a new target

Dyson Wilkes dyson at akya.co.uk
Tue Sep 2 09:05:19 PDT 2008


Hi

I am interested in developing a new target for LLVM and wanted to check 
where my new code should reside.  Should I just add a new sub-directory 
to lib/Targets and populate that with the necessary files?  I am using 
ARM as a template, as I am most familiar with that architecture, so I 
assume copying files from that directory is a good starting point.

I have tried a trivial build of a new target based on ARM by copying all 
the ARM target files to a new directory and changing names of files in 
the code to create a "new" target.  After adding the new target to the 
TARGETS_TO_BUILD list in "configure", I was able to "make" a new build 
that included the new target.  Of course it is just a copy of the ARM 
target at this stage but it confirms I have grasped the basics of the 
LLVM tree and build process.

My concern is that, if there is a new release of LLVM, I will need to 
re-integrate my source into it.  At this stage this looks fairly trivial 
to do but I do now want to get caught out in the future by ploughing on 
without checking there is not a more intelligent way to organise my code 
that I have overlooked.

Cheers,

 - Dyson



More information about the llvm-dev mailing list