mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 21:49:36 +00:00
- Toolchain overrides via `[toolchain]` and env (`DCR_*`) - ASM `.S` preprocessing via GCC/Clang (`-x assembler-with-cpp`)
1.1 KiB
1.1 KiB
Build section
Schema
[build]
language = "c"
standard = "c11"
compiler = "clang"
kind = "bin"
# optional:
# target = "./dist"
# platform = "x86_64"
# cflags = ["-Wall"]
# ldflags = ["-lm"]
Fields
language(string, required):c,c++,cpp,cxx, orasm.standard(string, required): language standard passed to compiler.compiler(string, required): compiler command (for exampleclang,gcc,cl).kind(string, required):bin,staticlib, orsharedlib.target(string, optional): custom output directory for final artifact.platform(string, optional): architecture hint for compiler (used for-marchor/arch).cflags(string array, optional): extra compile flags.ldflags(string array, optional): extra link flags.
Toolchain section
[toolchain]
cc = "clang"
cxx = "clang++"
as = "as"
ar = "ar"
ld = "ld"
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.
runis not allowed for library kinds (staticlib,sharedlib).