From cfb2c22a8d10d755e43260cfee648b8f6e722bb6 Mon Sep 17 00:00:00 2001 From: Anders Elfgren Date: Fri, 16 Feb 2024 19:11:45 +0100 Subject: [PATCH] Updated zig version to 0.12.0-dev.2063+804cee3b9 --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index f01d49b..adbbaa3 100644 --- a/build.zig +++ b/build.zig @@ -68,7 +68,7 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); lib.addIncludePath(.{ .path = "./test_cases/include" }); - if (target.getAbi() == .msvc) { + if (target.result.abi == .msvc) { lib.linkLibC(); } else { lib.linkLibCpp(); @@ -86,8 +86,8 @@ pub fn build(b: *std.Build) void { lib.addCSourceFile(.{ .file = .{ .path = "./test_cases/c022_cpp_string_glue.cpp" }, .flags = cflags }); test_cases.linkLibrary(lib); - const cpp_mod = b.addModule("cpp", .{ .source_file = .{ .path = "src/cpp.zig" } }); - test_cases.addModule("cpp", cpp_mod); + const cpp_mod = b.addModule("cpp", .{ .root_source_file = .{ .path = "src/cpp.zig" } }); + test_cases.root_module.addImport("cpp", cpp_mod); const run_test_cases = b.addRunArtifact(test_cases);