https://github.com/diohabara/ccc
c compiler by c
https://github.com/diohabara/ccc
c compiler docker
Last synced: 9 months ago
JSON representation
c compiler by c
- Host: GitHub
- URL: https://github.com/diohabara/ccc
- Owner: diohabara
- License: mit
- Created: 2022-05-15T16:27:36.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-08-10T03:40:08.000Z (almost 3 years ago)
- Last Synced: 2025-04-06T00:24:05.424Z (about 1 year ago)
- Topics: c, compiler, docker
- Language: C
- Homepage:
- Size: 316 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ccc
[](https://github.com/diohabara/ccc/actions/workflows/ci.yaml)
An experimental C compiler.
## how to develop
If you're using Ubuntu, you can use the commands without `x`.
### dependencies
- [`docker`](https://www.docker.com/)
### build
When you want to build Docker env,
```bash
docker build . -t ccc
```
### help
When you want to know what options exist,
```bash
make help
```
### lint/format
When you want to check/format source code,
```bash
make lint
```
### test
When you want to see if the compiler is working,
```bash
make test
```
### debug
If you want to debug interactively, use `gdb`.
```bash
gdb ./ccc
```
If you want to debug `main() { a = 1; b = 2; return 3; }` in `gdb`,
```bash
r 'main() { a = 1; b = 2; return 3; }'
```
### clean
When you want to remove object files,
```bash
make clean
```
## TODO
- [ ] self host
- `make self-host`
## references
-
-