code-yeongyu / code-yeongyu/c11-compiler-zig-omo

[Sisyphus] phase-2 / zcc / Wave 10 — Driver integration + test corpus

Open
#25 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Scope
Integrate all prior waves into a production-ready `zcc` driver and validate against the full Phase 1 test corpus.

## Deliverables
- `phase2/zcc/src/driver.zig` — full driver logic:
- `zcc -c foo.c -o foo.o` (compile to object).
- `zcc -O0` / `-O2` (optimization level selection).
- `zcc -g` (emit DWARF).
- `zcc -fsanitize=address` / `-fsanitize=undefined` stubs (emit placeholder sections; full sanitizers out of scope for Phase 2).
- `zcc -o out` (link via system `ld` or `lld` if available).
- `phase2/zcc/src/link.zig` — thin linker driver wrapper.
- Update `build.zig` to support `zig build test-full` running the entire corpus.

## Success Criteria
1. `zcc` builds the DOOM headless smoke test (`phase1/doom/`) and the binary runs (or at least reaches main and exits cleanly).
2. `zcc` builds the HTTP/2 server (`phase1/http2/`) and the binary passes the same `make test` suite as the gcc/clang-built version.
3. Driver CLI matches common `gcc`/`clang` flags where applicable; unsupported flags print a warning and continue.

## Dependencies on Prior Waves
- **Wave 0–9** — all compiler phases must be functional.

## Suggested Role Assignment
`driver-engineer`

## Test Corpus Expectations
- DOOM headless smoke: compile, link, run; verify no crash in first 100 frames or menu init.
- HTTP/2 server: compile, link, run `make test`; compare results against gcc/clang baseline.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with phase2/zcc/src/driver.zig, phase2/zcc/src/link.zig, and build.zig to understand the existing entry points and test target. Run the current Phase 1 corpus, including phase1/doom/ and phase1/http2/ with its make test suite, then compare behavior with gcc/clang. Done means the listed zcc flags work, unsupported flags warn, and test-full validates both programs.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, zig
Domain
build-system, compilers, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.