Skip to content

Commit 4b44665

Browse files
authored
Merge pull request #3 from hasanpasha/main
update to zig-14
2 parents 6ce7ef4 + 0a72559 commit 4b44665

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.github/workflows/zigbuild.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ jobs:
2121
run: |
2222
sudo apt update
2323
sudo apt install -y wget
24-
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main"
24+
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main"
2525
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
2626
sudo apt update
27-
sudo apt install -y llvm-18
27+
sudo apt install -y llvm-19
2828
2929
- name: Install LLVM (MacOS)
3030
if: startsWith(matrix.runs-on, 'macos')
3131
run: brew install llvm
3232

3333
- name: Build Summary
3434
run: |
35-
zig build -DExamples --summary all -freference-trace
35+
zig build -Dexamples --summary all -freference-trace

build.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn build(b: *std.Build) !void {
2323
llvm_module.link_libcpp = true;
2424

2525
switch (target.result.os.tag) {
26-
.linux => llvm_module.linkSystemLibrary("LLVM-18", .{}), // Ubuntu
26+
.linux => llvm_module.linkSystemLibrary("LLVM-19", .{}), // Ubuntu
2727
.macos => {
2828
llvm_module.addLibraryPath(.{
2929
.cwd_relative = "/opt/homebrew/opt/llvm/lib",
@@ -44,7 +44,7 @@ pub fn build(b: *std.Build) !void {
4444
.optimize = optimize,
4545
});
4646
switch (target.result.os.tag) {
47-
.linux => clang_module.linkSystemLibrary("clang-18", .{}), // Ubuntu
47+
.linux => clang_module.linkSystemLibrary("clang-19", .{}), // Ubuntu
4848
.macos => {
4949
clang_module.addLibraryPath(.{
5050
.cwd_relative = "/opt/homebrew/opt/llvm/lib",
@@ -62,7 +62,7 @@ pub fn build(b: *std.Build) !void {
6262
else
6363
clang_module.link_libcpp = true;
6464

65-
const examples = b.option(bool, "Examples", "Build all examples [default: false]") orelse false;
65+
const examples = b.option(bool, "examples", "Build all examples [default: false]") orelse false;
6666
if (examples) {
6767
buildExample(b, .{
6868
.filepath = "examples/sum_module.zig",

build.zig.zon

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.{
2-
.name = "llvm-zig",
2+
.name = .llvm_zig,
33
.version = "18.1.8",
4-
.minimum_zig_version = "0.13.0",
4+
.minimum_zig_version = "0.14.0",
5+
.fingerprint = 0xbf48c74bc4247821,
56
.paths = .{
67
"src",
78
"build.zig",

examples/factorial_module.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ pub fn main() void {
5454

5555
// Verify the module
5656
var errMsg: ?[*:0]u8 = null;
57-
_ = analysis.LLVMVerifyModule(module, types.LLVMVerifierFailureAction.LLVMPrintMessageAction, &errMsg);
57+
_ = analysis.LLVMVerifyModule(module, types.LLVMVerifierFailureAction.LLVMPrintMessageAction, @ptrCast(&errMsg));
5858
if (errMsg) |msg| {
5959
@panic(std.mem.span(msg));
6060
// core.LLVMDisposeMessage(msg);

0 commit comments

Comments
 (0)