we are integrating support in Clang + LLVM for a target architecture (an accelerator device) we are developing. Currently, we have a git repository, which contains LLVM 9 together with the added/changed files from us.
Now, we want to have a sustainable strategy for handling the llvm-project repository together with our changes. To summarize, we want to migrate to LLVM 12, start with 12.0.0, add our target architecture support based on this version, continue development of our target, and from time to time get the latest changes from the official llvm-project repo so we keep up to date over time.
Hence, we somehow have to "merge" the llvm-project and our repository, and keep history of both. As far as I know, there are several ways we could do this, e.g. using submodules or subtree merge.
In the future, if support for our target architecture is mature, and the hardware is publicly available, for us it would be interesting to have our target support in the official llvm-project repository, in which case our additions potentially would have to go into the official repo.
My question is: Is there an intended way of how we should handle this with git?
Any hints would be greatly appreciated.