(Go: >> BACK << -|- >> HOME <<)

Skip to content

BrandonKi/jcc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Just a C Compiler (jcc)

C Compiler.

Can use either the custom backend or llvm.

The custom backend is located in jb/ which was previously a separate project(jb).

Examples

WIP, can currently handle a decent amount of stuff (functions, pointers, if/else, for, do/while, etc.). Take a look in the tests directory or commit history for a fuller picture of how much is supported.

Spec/Reference

C Spec

C preprocessor

Intel x86_64 Instruction set

Build

Replace CMAKE_PREFIX_PATH with your path/to/llvm

Build(Visual Studio)

cmake "-DCMAKE_PREFIX_PATH:STRING=C:/Program Files/llvm-16.0.6-windows-amd64-msvc16-msvcrt-dbg" -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -B/build -G "Visual Studio 17 2022"

Build(Clang+Ninja)

cmake "-DCMAKE_PREFIX_PATH:STRING=C:/Program Files/llvm-16.0.6-windows-amd64-msvc16-msvcrt-dbg" -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -B/build -GNinja