zig icon indicating copy to clipboard operation
zig copied to clipboard

dev: introduce dev environments that enable compiler feature sets

Open jacobly0 opened this issue 7 months ago • 0 comments

This allows specifying a development environment for reducing compile times while building the compiler, each targeted at developing a specific part of the compiler. The legacy options build_options.only_c and build_options.only_core_functionality have been replaced with the new system. This system allows easily specifying new optional features and new environments independently.

$ time zig build -Dno-lib -Duse-llvm=false -Ddev=full

real	0m9.462s
user	0m13.092s
sys	0m1.371s
$ time zig build -Dno-lib -Duse-llvm=false -Ddev=x86_64-linux

real	0m5.578s
user	0m7.295s
sys	0m0.860s
$ zig-out/bin/zig build
thread 292207 panic: Development environment x86_64-linux does not support feature build_command

jacobly0 avatar Jul 19 '24 09:07 jacobly0