Skip to content

LucSAMAIN/4IF_PLD

Folders and files

NameName
Last commit message
Last commit date
Mar 28, 2025
Apr 14, 2025
Apr 13, 2025
Apr 14, 2025
Mar 26, 2025
Mar 25, 2025
Apr 14, 2025
Mar 10, 2025
Apr 20, 2025
Apr 20, 2025
Apr 20, 2025
Apr 11, 2025

Repository files navigation

IFCC compiler

Introduction

The IFCC compiler is a compiler for a subset of the C programming language. It handles x86_64 and WebAssembly (WASM) architectures. It uses our own IR (Intermediate Representation) to help handle the compilation process with the different architectures and optimizations.

Group

  • PALISSER Eugénie
  • GOUINEAUD Romane
  • MUHULET Mathias
  • SAMAIN Luc
  • JOUSSOT-DUBIEN Gabin
  • PERRIGAULT Simon

Build

To build the IFCC compiler, go to the compiler directory and use the following command:

make

This will create the ifcc executable in the compiler directory.

Usage

To compile your C program, use the following command:

path/to/ifcc [-h] [-v] [-o <output_file>] [-w] <source_file.c>

The options are :

  • -o <output_file>: Specify the output file name
  • -v: Enable verbose mode, which prints the symbol table in the output
  • -h: Show help message
  • -w: Generate WebAssembly code instead of x86_64
  • <source_file.c>: The input C source file to be compiled

WebAssembly

If you want to compile to WebAssembly, you need to install different programs including Node.js.

You can run setup.sh which will do it for you, if you have the necessary rights of course.