Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 858 Bytes

README.md

File metadata and controls

33 lines (27 loc) · 858 Bytes

QCC

  • qcc is a small toy compiler for C language.
  • waiting for pull-req!

FEATURES

  • qcc generates bitcode from C source code with LLVM. so we have to convert bitcode to native.
  • the shell script './qcc.sh' does it. or do yourself such as below:
$ ./qcc c.c -o c.bc # qcc generates c.bc
$ llc-3.8 c.bc # c.bc -> c.s
$ clang c.s # c.s -> a.out

BUILD

  • used tools: clang, llvm-3.8
  • if you are using Ubuntu or Debian, maybe you can see what you have to apt-get install if you look at Dockerfile.
$ make
$ make test
$ ./qcc.sh <SOURCE CODE>

TRY ON DOCKER

  • follow below
docker build -t="qcc" .
docker run -it "qcc" .