Are there limitations of the zig build system (build.zig) wrt free-standing- or Tier-3-targets? I am asking, because the documentation says, that tier-3-targets do not support the standard library, but build.zig uses std.build.Builder.
I would assume the build works fine for all tier 3 targets but the question came up in a discussion, so I wanted to confirm.
Thanks in advance.
#Limtitations of ZIG build?
1 messages · Page 1 of 1 (latest)
It's about building on freestanding and not about building for freestanding iirc
What i mean is limitations for building on for example linux for a tier 3 target?
You can't run zig build on a tier3 host, but you can use zig build to compile to a tier3 target
There shouldn't be any limitations there, since the build script doesn't really care what the target is, it just passes that through to the compiler
Tiers only applies on zig running on those platforms
zig code in general
Tier 3 means Zig will run albeit, std will need a lot of help to work
Right - the tier system is about a combination of
- Whether you can run the Zig compiler on that target
- Whether the stdlib is set up to support programs that target that target.
However, it doesn't mean that you inherently cannot build any code for that target using Zig, provided that it has at least minimal "you can generate code for this" support.
As a illustration, you can write your own OS that runs on x64, but still use Zig to build both the kernel code and userspace code, since Zig can do x64 - even though your OS is not even in the Zig tier list.