Skip to content

Update to zig 0.14 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2025
Merged

Conversation

SoraTenshi
Copy link
Member

With zig having their 0.14 release, i thought i update our build system support :)

Copy link
Member

@Techatrix Techatrix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me.

One thing that could be improved would be to use the addLibrary function combined with a "linkage" build option like this:

const linkage = b.option(std.builtin.LinkMode, "linkage", "Link mode") orelse .static;

const lib = b.addLibrary(.{
    .linkage = linkage,
    .name = "capstone",
    .root_module = b.createModule(.{
        .target = target,
        .optimize = optimize,
        .pic = pic,
        .strip = strip,
        .link_libc = true,
    }),
});

This is how the Zig 0.14.0 release notes suggested it.

@SoraTenshi
Copy link
Member Author

@Techatrix i adjusted it to your comment.
Can you look over it again? Locally it compiled and run-all-tests also yielded no error.
cstool also built.

@SoraTenshi SoraTenshi merged commit 7995ce6 into allyourcodebase:main Mar 17, 2025
6 checks passed
@SoraTenshi SoraTenshi deleted the upgrade-0.14 branch March 17, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants