-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
madc builds from source on Linux (x86-64 is the validated platform today; the MIR backend also targets aarch64, ppc64le, s390x, and riscv64).
- clang++ or g++ with C++11 support
- The madc MIR fork (libmir + c2mir) — see Step 1
madc's backend is MIR — but madc requires
its own fork, not upstream MIR. The
fork carries native C99 _Complex, __attribute__((cleanup)), ≤16-byte
SIMD/vector support, direct ELF object/executable emission, DWARF debug info,
PIC codegen, and the ABI fixes madc's IR depends on.
Clone madc first (its MIR_COMMIT file pins the exact fork commit each madc
revision is verified against), then build the fork at /workspace/mir:
git clone https://github.com/derekbsnider/madc.git
git clone -b develop https://github.com/derekbsnider/mir /workspace/mir
git -C /workspace/mir checkout "$(cat madc/MIR_COMMIT)" # pin to the verified commit
make -C /workspace/mirFork releases are tagged v<upstream-base>-madc.<madc-version> (e.g.
v1.0-madc.0.38.0) — each pairs with the madc release named in its suffix, and
madc's MIR_VERSION file names the fork release it depends on. Checking out a
release tag instead of the MIR_COMMIT pin works when building a tagged madc
release.
cd madc
make -C srcThe binary lands at bin/madc.
bin/madc tests/testint.madYou should see output like:
123: 123
i: 456
j: 456
sudo cp bin/madc /usr/local/bin/Then you can run madc from anywhere:
madc myprogram.madmake -C src fulltest # unit tests + all integration testsThis runs the doctest unit suites (9,000+ assertions) and 740+ integration tests. Everything should pass on a clean build.
- Your First Program — write and run something from scratch
- CLI Reference — command-line flags and options
- ← Back to Home