mirror of
https://github.com/allyourcodebase/elfutils.git
synced 2026-11-17 01:20:34 +00:00
elfutils ported to the zig build system
- C 70.9%
- Zig 29.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| .gitattributes | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| config.h.in | ||
| COPYING | ||
| COPYING-GPLV2 | ||
| COPYING-LGPLV3 | ||
| known-dwarf.h | ||
| README.md | ||
elfutils
This is elfutils, packaged for Zig.
Installation
First, update your build.zig.zon:
# Initialize a `zig build` project if you haven't already
zig init
zig fetch --save git+https://github.com/allyourcodebase/elfutils.git
You can then import elfutils in your build.zig with:
const elfutils_dependency = b.dependency("elfutils", .{
.target = target,
.optimize = optimize,
});
const libelf = elfutils_dependency.artifact("elf");
const libdw = elfutils_dependency.artifact("dw");
const libasm = elfutils_dependency.artifact("asm");
your_exe.linkLibrary(libelf);
your_exe.linkLibrary(libdw);
your_exe.linkLibrary(libasm);