Hi,
I would like to import lang/zig.
Zig is a general-purpose programming language and toolchain for
maintaining robust, optimal, and reusable software.
https://ziglang.org/
The target version is a development version (0.8.0-dev.1038+58344e001)
as OpenBSD support is somehow partial in latest stable (0.7.1). The
current development version is mostly functional: zig is able to
build zig, testsuite mostly succeed (failure on crosscompilation), and
I still have problems with .event loop which needs EVFILT_USER (or I
need to implements .event differently).
Zig is using llvm as backend (it should become an optional dependency
at some point), and the current code support only llvm-11 (and work is
in progress to support llvm-12). As we don't have these llvm versions
in ports (neither in base), the port is using zig-bootstrap
(https://github.com/ziglang/zig-bootstrap) repository, which provides
llvm+clang+lld+zig all-in-one.
The port is first building llvm-11, and next zig, which is statically
linked to the llvm+clang+lld libraries (so no llvm-11 parts on disk at
runtime).
I polished the build to be able to build and link with llvm-11 whereas
devel/llvm is installed, without conflicts. Patches on llvm-11 are
minimal.
The port isn't using the ${WRKSRC}/build script from upstream: this
build script is intented to crosscompile zig to others platforms, and
so llvm and zig are built two times. Instead of, I am providing a
files/build.sh script to build, install and test.
The port should be buildable on ${LLVM_ARCHS}, but I restricted it to
a smaller archs sets: the zig0 compiler (zig stage0 compiler written
in C++, and used to bootstrap to stage1) requires an insane datasize
(6 Go). I kept only archs where datasize of pbuild user was big
enough (amd64 arm64 and powerpc64).
I have tested it on amd64 exclusively.
Comments or OK ?
--
Sebastien Marie
No comments:
Post a Comment