Frédéric Heitzmann
2015-Jul-09 13:57 UTC
[LLVMdev] How to add a new target/toolchain to Clang ?
Hi all, I have been developping a out-of-tree backend. I would like to integrate it with clang. Note that my backend is rather simple, generates elf32, and I do not need about linux, libary paths, ... Can someone give me a pointer to a readme, an article, or maybe a good (i.e. simple) example ? Note :on a second step, I would like to support inline assembly in C code.. -- Frederic Heitzmann -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150709/4098d925/attachment.html>
On Thu, Jul 09, 2015 at 03:57:53PM +0200, Frédéric Heitzmann wrote:> Hi all, > > I have been developping a out-of-tree backend. > I would like to integrate it with clang. > Note that my backend is rather simple, generates elf32, and I do not need > about linux, libary paths, ... > > Can someone give me a pointer to a readme, an article, or maybe a good > (i.e. simple) example ? > > Note :on a second step, I would like to support inline assembly in C code.. >Here is a simple example for adding a new toolchain: http://reviews.llvm.org/D10700 See R600TargetInfo in lib/Basic/Targets.cpp for an example of a simple Target that supports inline assembly. -Tom> -- > Frederic Heitzmann> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Frédéric Heitzmann
2015-Jul-10 14:16 UTC
[LLVMdev] How to add a new target/toolchain to Clang ?
Thanks Tom for your help, it as indeed very easy to make the link with the linker (not sick joke). Unfortunately, clang generates object files for target x86_64, even though I try --target --triple, --arch, ... What is the trick to tell him which target to use ? -- Fred ps: not looked yet at inline assembly 2015-07-09 18:40 GMT+02:00 Tom Stellard <tom at stellard.net>:> On Thu, Jul 09, 2015 at 03:57:53PM +0200, Frédéric Heitzmann wrote: > > Hi all, > > > > I have been developping a out-of-tree backend. > > I would like to integrate it with clang. > > Note that my backend is rather simple, generates elf32, and I do not need > > about linux, libary paths, ... > > > > Can someone give me a pointer to a readme, an article, or maybe a good > > (i.e. simple) example ? > > > > Note :on a second step, I would like to support inline assembly in C > code.. > > > > Here is a simple example for adding a new toolchain: > http://reviews.llvm.org/D10700 > > See R600TargetInfo in lib/Basic/Targets.cpp for an example of a > simple Target that supports inline assembly. > > -Tom > > > -- > > Frederic Heitzmann > > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150710/f74e526e/attachment.html>