I8C
I8C is a compiler for Infinity notes. It compiles I8 source code to object code that can then be linked into executables or shared libraries in the usual way.
Installation
You can install I8C with PIP:
pip install --user
or you can build from source:
git clone https://gitlab.com/gbenson/i8c.git cd i8c python setup.py test # optional python setup.py install --user
Either will install I8C in ~/.local/bin/i8c
, so you may need to add ~/.local/bin
to your path. Alternatively you can omit the --user
and install I8C globally on your system.
Usage
In most cases the command you want is:
i8c -c file.i8
which reads and compiles file.i8
and writes the result to file.o
.
In general I8C operates like GCC, so if you’re used to GCC then I8C should make sense. I8C uses GCC both to preprocess its input (unless invoked with -fpreprocessed
) and to assemble its output (unless invoked with -E
or -S
). If GCC is used, all options not explicitly listed by i8c --help
will be passed to GCC unmodified.
The following environment variables may be set to cause I8C to use a specific GCC executable:
I8C_CC
- Program for compiling C programs (default:
gcc
) I8C_CPP
- Program for running the C preprocessor, with results to standard output (default:
$(I8C_CC) -E -x c
) I8C_AS
- Program for compiling assembly files (default:
$(I8C_CC) -x assembler-with-cpp
)
Links
- Source
- https://gitlab.com/gbenson/i8c/
- Python package
- https://pypi.python.org/pypi/i8c/
- Integration testing
- https://travis-ci.org/gbenson/i8c
- Bug tracker
- https://sourceware.org/bugzilla/ (product "infinity", component "i8c")
- Mailing list
- infinity@sourceware.org, https://sourceware.org/ml/infinity/