| ... | ... | @@ -87,15 +87,9 @@ pub fn addModule(self: *TranslateC, name: []const u8) *std.Build.Module { |
| 87 | 87 | /// current package, but not exposed to other packages depending on this one. |
| 88 | 88 | /// `addModule` can be used instead to create a public module. |
| 89 | 89 | pub fn createModule(self: *TranslateC) *std.Build.Module { |
| 90 | | const b = self.step.owner; |
| 91 | | const module = b.allocator.create(std.Build.Module) catch @panic("OOM"); |
| 92 | | |
| 93 | | module.* = .{ |
| 94 | | .builder = b, |
| 90 | return self.step.owner.createModule(.{ |
| 95 | 91 | .root_source_file = self.getOutput(), |
| 96 | | .dependencies = std.StringArrayHashMap(*std.Build.Module).init(b.allocator), |
| 97 | | }; |
| 98 | | return module; |
| 92 | }); |
| 99 | 93 | } |
| 100 | 94 | |
| 101 | 95 | pub fn addIncludeDir(self: *TranslateC, include_dir: []const u8) void { |