My attempt at making a Brainfuck compiler from first principles, with no prior compiler design experience
See Cross-Compilation below for all available system configuration
To make a cross-compiling compiler (e.g. compile Brainfuck code for arm64 macOS on a Linux amd64 machine) pass -DBFC_TARGET_SYSTEM="<ISA>;<ABI>;<OS>" to your CMake configuration command. Below is a table of all supported systems and the values to pass
| OS | ABI | ISA | Support |
|---|---|---|---|
| Linux | sysV | amd64 | 🚧 Work in progress |
| macOS | arm64e | arm64 | 🕐 Support planned |
Important
All machines that are planning to run any compiler/cross-compiler are expected to have 8-bit bytes and use two's complement to represent signed integers (which is implicitly asserted by the use of C++20+). C/C++ compiler of choice is Clang, especially for Windows hosts, since MSVC doesn't support some required C23 features as of right now
This way, in order to build a cross-compiler to amd64 Linux, you would pass -DBFC_TARGET_SYSTEM="amd64;sysV;Linux"
Not passing anything will use current system's configuration, if available
Tip
You might need to add some missing platform-specific headers to your environment in case you're building a cross-compiler
This project is distributed under the Apache-2.0 License.
See LICENSE for permissions, conditions and limitations.