diff --git a/src/common.zig b/src/common.zig index a4449730712862084f96479111087a767af5d428..b3c06ad8e78c5b3ac5e1fca1a176caa58e7f5656 100644 --- a/src/common.zig +++ b/src/common.zig @@ -110,6 +110,7 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec .c_source_files = &[_][]const u8{}, .deps = &[_]u.Module{}, .clean_path = d.path, + .yaml = null, }); }, else => blk: { @@ -152,6 +153,7 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec .clean_path = "", .only_os = &[_][]const u8{}, .except_os = &[_][]const u8{}, + .yaml = m.yaml, }; } diff --git a/src/util/modfile.zig b/src/util/modfile.zig index a5bf56616abd9ae8f11dd7eed1d5781cb7a9b203..0ae5c9756322fbfb2e656b08e0e6f500ae60883b 100644 --- a/src/util/modfile.zig +++ b/src/util/modfile.zig @@ -21,6 +21,7 @@ pub const ModFile = struct { c_source_flags: [][]const u8, c_source_files: [][]const u8, deps: []u.Dep, + yaml: yaml.Mapping, pub fn init(alloc: *std.mem.Allocator, fpath: []const u8) !Self { // @@ -76,6 +77,7 @@ pub const ModFile = struct { .c_source_flags = try doc.mapping.get_string_array(alloc, "c_source_flags"), .c_source_files = try doc.mapping.get_string_array(alloc, "c_source_files"), .deps = dep_list.items, + .yaml = doc.mapping, }; } }; diff --git a/src/util/module.zig b/src/util/module.zig index f8bbe19bb105c39e5e1d787f9b2ee78ee4afe572..d9a48d6e381b17b9be8ac9b5e357d7c919db7afe 100644 --- a/src/util/module.zig +++ b/src/util/module.zig @@ -3,6 +3,7 @@ const gpa = std.heap.c_allocator; const builtin = @import("builtin"); const u = @import("index.zig"); +const yaml = @import("./yaml.zig"); // // @@ -17,6 +18,7 @@ pub const Module = struct { c_source_files: [][]const u8, only_os: [][]const u8, except_os: [][]const u8, + yaml: ?yaml.Mapping, deps: []Module, clean_path: []const u8, @@ -34,6 +36,7 @@ pub const Module = struct { .clean_path = try dep.clean_path(), .only_os = dep.only_os, .except_os = dep.except_os, + .yaml = null, }; }