In addition to all the reasons for the quality of the code generator, there are other problems:
- Free C compilers (gcc, clang) are a bit Unix oriented
- Supporting more than one compiler (for example, gcc on Unix and MSVC on Windows) requires duplication of effort.
- compilers can drag and drop runtime libraries (or even * nix emulations) on Windows, which are painful. Two different C runtimes (such as linux libc and msvcrt), which are based on, complicate your own runtime and its maintenance.
- In your project, you will get a large block with an external version, which means switching the main version (for example, changing the distortion can damage your runtime library, ABI changes, such as changing the alignment) may require some work. Note that this applies to the compiler and the external version (part) of the runtime library. And several compilers multiply this. This is not as bad for C as for the backend, although in the case when you directly connect (read: place a bet) to the backend, as if you were the gcc / llvm interface.
- In many languages that follow this path, you see that Cisms penetrate the main language. Of course, this will not please you, but you will be tempted :-)
- The functionality of a language that does not directly conform to the C standard (for example, nested procedures and other things that require the use of a stack) is complex.
- If something is wrong, users will encounter C-level compiler or linker errors that are outside their scope. Analyze them and make them your own painful ones, especially with multiple compilers and -versions
Please note that paragraph 4 also means that you will have to spend time to make everything work when external projects are developing. This is a time that is usually not included in your project, and since the project is more dynamic, multi-platform releases will need many additional release engineering to meet the changes.
So, in short, from what I saw, this step allows you to quickly get started (get a reasonable code generator for free for many architectures), but there are also disadvantages. Most of them are associated with loss of control and poor Windows support for * nix-oriented projects like gcc. (LLVM is too new to talk about the long term, but their rhetoric sounds the same as gcc ten years ago). If the project you are very dependent on follows a certain course (for example, GCC will work very slowly on win64), then you are stuck with it.
First, decide whether you want to have serious non * nix support (OS X is more unixy), or just a Linux compiler with a temporary mingw space for Windows? Many compilers need first-class Windows support.
Secondly, how prepared should the product be? What is the main audience? Is this an open source developer tool that can handle the DIY toolchain, or do you want to target the novice market (like many third-party products like RealBasic)?
Or do you really want to provide a well-designed product for professionals with deep integration and a complete set of tools?
All three are valid guidelines for the compiler project. Ask yourself what your main focus is, and don’t think that more options will be available on time. For example, evaluate the location of the projects that you selected as the front-end for GCC in the early nineties.
Essentially, the Unix path is to expand (maximize platforms)
Complete kits (such as VS and Delphi, the latter that recently also started supporting OS X and in the past supported linux) go deep and try to maximize performance. (specifically supports the Windows platform with deep levels of integration)
Third-party projects are less clear. They go more for self-employed programmers and niche stores. They have fewer resources for developers, but they manage them better.