This commit is contained in:
2026-02-26 18:09:07 +08:00
parent 83061cc460
commit c22d2dbddc
31 changed files with 781 additions and 431 deletions

View File

@@ -1,2 +1,31 @@
# Build section
## Schema
```toml
[build]
language = "c"
standard = "c11"
compiler = "clang"
kind = "bin"
# optional:
# target = "./dist"
# cflags = ["-Wall"]
# ldflags = ["-lm"]
```
## Fields
- `language` (string, required): `c`, `c++`, `cpp`, or `cxx`.
- `standard` (string, required): language standard passed to compiler.
- `compiler` (string, required): compiler command (for example `clang`, `gcc`, `cl`).
- `kind` (string, required): `bin` or `staticlib`.
- `target` (string, optional): custom output directory for final artifact.
- `cflags` (string array, optional): extra compile flags.
- `ldflags` (string array, optional): extra link flags.
## Behavior notes
- Compiler backend is selected by compiler string (`gcc`, `clang`, `cl`, `clang-cl`).
- Empty or unknown compiler value falls back to clang-like build path.
- `run` is not allowed for `kind = "staticlib"`.