-
Couldn't load subscription status.
- Fork 279
Description
Hey. I noticed some inconsistency in the handling of C dependencies:
glibandexpatare installed as system packages;v8is downloaded inbuild.zigbut it is built in a dedicated task;iconvis downloaded (from a fork) in the Makefile;iconv/mimalloc/netsurfis built using the officialmake/cmake;ada/curl/mbedtlsare built directly from build.zig.
For some dependencies the system clang is used, and for some zig cc, which can also create problems.
I don't think there's a perfect way, but it would be easier if all dependencies were delivered uniformly. For example, I was building a browser on Fedora and encountered a build failure if gcc was installed on the system (unless clang was explicitly specified for make).
What do you think about standardizing this? The simplest solution would be to switch to delivering dependencies through build.zig.zon and building with the system tooling (addSystemCommand, which runs make/cmake).
Here's what it might look like:
- all dependencies are loaded into build.zig.zon;
- small libraries are built locally (like libcurl now);
- complex systems (like netsurf) are built using their official tooling (taking into account the build type, dev/safe, valgrind, etc.);
- all of this is linked via
linkLibraryso that zig can handle dependencies; - instead of the system clang,
zig ccis always used; - building the browser is as simple as running
zig buildon any system.
In addition to more reliable and reproducible local builds (which would also lower the entry barrier for new contributors), this would significantly simplify packaging the browser in Linux repositories in the future.
Let me know if you are interested in PR on this.