| ... | ... | @@ -79,9 +79,9 @@ pub const SystemLib = struct { |
| 79 | 79 | }; |
| 80 | 80 | |
| 81 | 81 | pub const CSourceFiles = struct { |
| 82 | | dependency: ?*std.Build.Dependency, |
| 83 | | /// If `dependency` is not null relative to it, |
| 84 | | /// else relative to the build root. |
| 82 | root: LazyPath, |
| 83 | /// `files` is relative to `root`, which is |
| 84 | /// the build root by default |
| 85 | 85 | files: []const []const u8, |
| 86 | 86 | flags: []const []const u8, |
| 87 | 87 | }; |
| ... | ... | @@ -453,9 +453,9 @@ pub fn linkFramework(m: *Module, name: []const u8, options: LinkFrameworkOptions |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | pub const AddCSourceFilesOptions = struct { |
| 456 | | /// When provided, `files` are relative to `dependency` rather than the |
| 456 | /// When provided, `files` are relative to `root` rather than the |
| 457 | 457 | /// package that owns the `Compile` step. |
| 458 | | dependency: ?*std.Build.Dependency = null, |
| 458 | root: LazyPath = .{ .path = "" }, |
| 459 | 459 | files: []const []const u8, |
| 460 | 460 | flags: []const []const u8 = &.{}, |
| 461 | 461 | }; |
| ... | ... | @@ -466,7 +466,7 @@ pub fn addCSourceFiles(m: *Module, options: AddCSourceFilesOptions) void { |
| 466 | 466 | const allocator = b.allocator; |
| 467 | 467 | const c_source_files = allocator.create(CSourceFiles) catch @panic("OOM"); |
| 468 | 468 | c_source_files.* = .{ |
| 469 | | .dependency = options.dependency, |
| 469 | .root = options.root, |
| 470 | 470 | .files = b.dupeStrings(options.files), |
| 471 | 471 | .flags = b.dupeStrings(options.flags), |
| 472 | 472 | }; |