radare2 icon indicating copy to clipboard operation
radare2 copied to clipboard

Use ziglang for build

Open mgholam opened this issue 2 years ago • 4 comments

Description

Take a look at ziglang to cross build your c code on all platforms from one build system (do away with make, mason, compiler tool chains...).

mgholam avatar Aug 01 '22 04:08 mgholam

Worth noting that zig cc can only fully replace the existing toolchains if it supports all host and target platforms that r2's Make toolchain currently supports.

riptl avatar Aug 01 '22 08:08 riptl

Looking at the Zig docs seems like it also doesn't support GCC

riptl avatar Aug 01 '22 08:08 riptl

I've cross compiled an app with embedded sqlite with golang/zig for pi zero w, android termux, linux x64, windows 386 and x64, all from either linux, windows or even android termux. With just zig and golang installed (no cross compilers or gcc...).

mgholam avatar Aug 01 '22 09:08 mgholam

That will require people to use zig, which is not yet available on many platforms, several attemps has been made to replace make. But they all fail at some point for one reason or another. R2 users need to build on ancient unix systems so there are no plans to remove the make build system. And meson is widely available and pretty standard nowadays.

Im sure zig have some neat functionalities and it looks interesting but i dont plan to get rid of the available build systems.

trufae avatar Aug 01 '22 11:08 trufae