1

I am looking to develop a compiler based on LLVM which will require a new backend target.

The LLVM Backend Guide shows how to develop the new target under the LLVM source in a set directory structure (lib/Target/**) to integrate with the existing build system and, from what I can gather, with tools such as llc, llvm-config etc. Is it possible to develop the new target out of source, and integrate it with LLVM?

I know this is possible when adding new target-independent optimisation and analysis passes. These can written and compiled out of source and loaded via the opt tool for example. I thought there might be a similar approach for writing new targets.

I would like to do this to reduce the amount of coupling between my project and LLVM to some extent, since it bugs me to have an additional million lines of code in my VC, build/tag/IDE etc.

1 Answer 1

1

Unfortunately, this is not possible. Backends are tied pretty heavily to the main LLVM codebase with configure-time codegeneration, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.