#check if building for x86 or x64
1 messages · Page 1 of 1 (latest)
I think you should be able to check builtin.cpu.arch. https://ziglang.org/documentation/master/std/#A;builtin:cpu
E.g. from zig-protobuf:
https://github.com/Arwalk/zig-protobuf/blob/82fb770164335d8192547f6c236d558ecc5dbdc5/build.zig#L340-L347
Is that what you're looking for?
builtin.cpu.arch has an isX86 method too:
https://ziglang.org/documentation/master/std/src/std/Target.zig.html#L910
It'll return true for x86 and x86_64